Пример #1
0
        public async Task <IActionResult> EditUser([FromBody] UserEditViewModel ViewModel)
        {
            if (ModelState.IsValid)
            {
                ViewModel.Ip = Extension.GetClientUserIp(HttpContext);
                await _UserService.ChangePwd(ViewModel);

                if (!_Notifications.HasNotifications())
                {
                    return(Ok(new
                    {
                        Sucess = true,
                        Message = "修改成功"
                    }));
                }
            }
            return(Ok(new
            {
                sucess = false,
                Message = _Notifications.GetErrorMessage()
            }));
        }