Beispiel #1
0
 public async Task <IActionResult> AddInvitation(AddInvitation invitation)
 {
     if (await _service.AddInvitation(invitation))
     {
         return(Ok(new { status = "OK", message = "Poprawnie wysłano zaproszenie!" }));
     }
     return(Ok(new { status = "Exists", message = "Wysłałeś już takie zaproszenie!" }));
 }
Beispiel #2
0
        public async Task <IActionResult> Post(long gameId, string email)
        {
            try
            {
                var result = await _invitationService.AddInvitation(User.GetUserId(), string.Empty, 0);

                return(Ok(result));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
 public FamilyInvitation CreateInvitation([FromBody] FamilyInvitation invitation)
 {
     return(_invitationService.AddInvitation(invitation));
 }