[frontend/api] Add get and delete for avatar and banner

This commit is contained in:
pancakes 2024-11-28 01:03:35 +10:00 committed by Laura Hausmann
parent 93fd573ca6
commit 496f2f003a
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -11,6 +11,18 @@ internal class ProfileControllerModel(ApiClient api)
public Task UpdateProfileAsync(UserProfileEntity request) => public Task UpdateProfileAsync(UserProfileEntity request) =>
api.CallAsync(HttpMethod.Put, "/profile", data: request); api.CallAsync(HttpMethod.Put, "/profile", data: request);
public Task<string> GetAvatarUrlAsync() =>
api.CallAsync<string>(HttpMethod.Get, "/profile/avatar");
public Task DeleteAvatarAsync() =>
api.CallAsync(HttpMethod.Delete, "/profile/avatar");
public Task<string> GetBannerUrlAsync() =>
api.CallAsync<string>(HttpMethod.Get, "/profile/banner");
public Task DeleteBannerAsync() =>
api.CallAsync(HttpMethod.Delete, "/profile/banner");
public Task<string> GetDisplayNameAsync() => public Task<string> GetDisplayNameAsync() =>
api.CallAsync<string>(HttpMethod.Get, "/profile/display_name"); api.CallAsync<string>(HttpMethod.Get, "/profile/display_name");