Modules/UserCenter/Gardener.UserCenter.Client.Services/ClientService.cs
(完整代码) 1KB// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
// gitee:https://gitee.com/hgflydream/Gardener
// issues:https://gitee.com/hgflydream/Gardener/issues
// -----------------------------------------------------------------------------
using Gardener.Authorization.Dtos;
using Gardener.Client.Base;
using Gardener.SystemManager.Dtos;
using Gardener.UserCenter.Dtos;
using Gardener.UserCenter.Services;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Gardener.UserCenter.Client.Services
{
[ScopedService]
public class ClientService : ClientServiceBase<ClientDto, Guid>, IClientService
{
public ClientService(IApiCaller apiCaller) : base(apiCaller, "client")
{
}
public async Task<List<FunctionDto>> GetFunctions(Guid id)
{
return await apiCaller.GetAsync<List<FunctionDto>>($"{controller}/{id}/functions");
}
public async Task<TokenOutput> Login(ClientLoginInput input)
{
var result = await apiCaller.PostAsync<ClientLoginInput, TokenOutput>($"{controller}/login", input);
return result;
}
public async Task<TokenOutput> RefreshToken(RefreshTokenInput input)
{
return await apiCaller.PostAsync<RefreshTokenInput, TokenOutput>($"{controller}/refresh-token", input);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
