Skip to content

Commit

Permalink
Code(WEB::SettingsService): Add method to update integrations in Sett…
Browse files Browse the repository at this point in the history
…ingsService
  • Loading branch information
ktutak1337 committed Jul 23, 2024
1 parent 29ba1f0 commit b9050f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ internal interface ISettingsService

ValueTask<ApiResponse<AppSettingsResponse>> GetSettingsAsync(string key = SettingsKey);
ValueTask<ApiResponse> UpdateProfileAsync(string name, string avatarUrl, string description, string key = SettingsKey);
ValueTask<ApiResponse> UpdateIntegrationsAsync(List<Integration> Integrations, string key = SettingsKey);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,13 @@ public async ValueTask<ApiResponse> UpdateProfileAsync(string name, string avata

return response;
}

public async ValueTask<ApiResponse> UpdateIntegrationsAsync(List<Integration> Integrations, string key = "app-settings")
{
var payload = new UpdateIntegrationsRequest(key, Integrations);

var response = await _httpClient.PutAsync($"/settings/{key}/integrations", payload);

return response;
}
}

0 comments on commit b9050f0

Please sign in to comment.