Пример #1
0
        public async Task <ActionResult <DefaultResponse <bool> > > UpdateRole([FromBody] UpdateRoleViewModel model)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(false));
            }
            await _roleManagerAppService.Update(model);

            return(Response(true));
        }
Пример #2
0
        public async Task <ActionResult> UpdateRole(string role, [FromBody] UpdateRoleViewModel model)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(ModelStateErrorResponseError());
            }
            await _roleManagerAppService.Update(role, model);

            return(ResponsePutPatch());
        }