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))); }
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!"); }