public async Task <ActionResult <DefaultResponse <bool> > > ResetPassword([FromBody] AdminChangePasswordViewodel model)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(false));
            }

            await _userManageAppService.ResetPassword(model);

            return(Response(true));
        }
Esempio n. 2
0
        public async Task <ActionResult> ResetPassword(string username, [FromBody] AdminChangePasswordViewodel model)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(ModelStateErrorResponseError());
            }

            model.Username = username;
            await _userManageAppService.ResetPassword(model);

            return(ResponsePutPatch());
        }