Exemple #1
0
 public async Task <IActionResult> CreateRequest([FromBody] ClanJoinView clanJoinView)
 {
     if (HttpContext.TryGetCurrentSession(out AccountSessionView accountSessionView))
     {
         return(Ok(await ClanService.CreateJoinRequest(accountSessionView.AccountID, clanJoinView)));
     }
     return(Ok(ValidatedView.Invalid(ErrorCode.OPERATION_FAILED)));
 }
Exemple #2
0
 protected void Confirm()
 {
     if (!ClanService.CreateJoinRequest(
             new ClanJoinView {
         ClanID = Clan.ID, Description = Description
     },
             out string message, out HttpStatusCode code))
     {
         NotificationService.ShowError(message, "Failed to send join request!");
     }