コード例 #1
0
        /// <summary>
        /// 更新密码
        /// </summary>
        /// <param name="command"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task <Result <int> > UpdateUserAsync(AdminUserUpdatePasswordCommand command, CancellationToken cancellationToken = default)
        {
            var res = await adminUserService.UpdateAsync(command, cancellationToken);

            if (res > 0)
            {
                return(RestFull.Success(data: res));
            }
            else
            {
                return(RestFull.Fail(data: res));
            }
        }
コード例 #2
0
 public async Task <Result <int> > UpdateUserAsync([Required][FromBody] AdminUserUpdatePasswordCommand command, CancellationToken cancellationToken = default)
 {
     return(await adminAppService.UpdateUserAsync(command, cancellationToken));
 }