Ejemplo n.º 1
0
        public async Task <UserModel> AddRole([FromQuery] string role, string username)
        {
            if (await applicationUserService.AddRole(username, role) == OperationStatus.Failed)
            {
                BadRequest();
                return(null);
            }

            return(await applicationUserService.GetUserByName(username));
        }