Esempio n. 1
0
 [HttpPost("addrole")] // POST: api/admin/addrole
 public async Task <JToken> AddRoleAsync(JToken jAuthenticatedUserAndRoleToAdd) => (ModelState.IsValid ? await _adminManager.AddRoleAsync(jAuthenticatedUserAndRoleToAdd["AuthenticatedUser"]?.To <AuthenticateUserVM>(), jAuthenticatedUserAndRoleToAdd["RoleToAdd"]?.To <AdminEditRoleVM>()) : _defaultInvalidResponse).ToJToken();