fixes for Nextcloud

This commit is contained in:
2023-10-02 15:25:16 +02:00
parent c7f5de4974
commit b2ef1e5cce
21 changed files with 233 additions and 101 deletions

View File

@@ -13,17 +13,17 @@ namespace Pilz.Networking.CloudProviders.Nextcloud.Client
{
}
public Task<UserInfo?> GetUserInfo()
public UserInfo? GetUserInfo()
{
if (!string.IsNullOrEmpty(Client.CurrentLogin?.LoginName))
return GetUserInfo(Client.CurrentLogin.LoginName);
else
return Task.FromResult<UserInfo?>(null);
return null;
}
public async Task<UserInfo?> GetUserInfo(string username)
public UserInfo? GetUserInfo(string username)
{
var result = await Client.Ocs.Cloud.GetUserMeta(username);
var result = Client.Ocs.Cloud.GetUserMeta(username);
if (result?.Data != null)
return new UserInfo(result.Data);