[frontend/api] Make GetDisplayNameAsync not nullable
This commit is contained in:
parent
482172b8e9
commit
93fd573ca6
2 changed files with 3 additions and 3 deletions
|
@ -11,8 +11,8 @@ internal class ProfileControllerModel(ApiClient api)
|
|||
public Task UpdateProfileAsync(UserProfileEntity request) =>
|
||||
api.CallAsync(HttpMethod.Put, "/profile", data: request);
|
||||
|
||||
public Task<string?> GetDisplayNameAsync() =>
|
||||
api.CallNullableAsync<string>(HttpMethod.Get, "/profile/display_name");
|
||||
public Task<string> GetDisplayNameAsync() =>
|
||||
api.CallAsync<string>(HttpMethod.Get, "/profile/display_name");
|
||||
|
||||
public Task<string?> UpdateDisplayNameAsync(string displayName) =>
|
||||
api.CallNullableAsync<string>(HttpMethod.Post, "/profile/display_name", data: displayName);
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
{
|
||||
UserProfile = await Api.Profile.GetProfileAsync();
|
||||
State = State.Loaded;
|
||||
DisplayName = await Api.Profile.GetDisplayNameAsync() ?? "";
|
||||
DisplayName = await Api.Profile.GetDisplayNameAsync();
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue