Exemple #1
0
 public async Task <IActionResult> AssingRole(int id, int role)
 {
     if (HttpContext.TryGetCurrentSession(out AccountSessionView accountSessionView))
     {
         return(Ok(await ClanService.AssignRole(accountSessionView.AccountID, id, (ClanRole)role)));
     }
     return(Ok(ValidatedView.Invalid(ErrorCode.OPERATION_FAILED)));
 }
 protected void Confirm()
 {
     if (!ClanService.AssignRole(Selected.ID, (int)Role, out string message, out HttpStatusCode code))
     {
         NotificationService.ShowError(message, "Failed to assign role!");
     }