Пример #1
0
 public async Task<IHttpActionResult> Accept(int groupId, int inviteId)
 {
     try
     {
         var userId = User.Identity.GetUserId();
         await _userGroupService.AcceptInvitationAsync(inviteId, userId);
         return Ok();
     }
     catch (ServiceException e)
     {
         if (e.Code == ErrorCodes.EntityNotFound)
         {
             return NotFound();
         }
         return InternalServerError();
     }
 }