예제 #1
0
        public async Task <IActionResult> AcceptInvite([FromQuery] Guid secret)
        {
            if (!Guid.TryParse(HttpContext.User.Identity.Name, out var userId))
            {
                return(Unauthorized());
            }

            var success = await groupService.AcceptInvite(secret, userId).ConfigureAwait(true);

            if (!success)
            {
                return(Unauthorized());
            }

            return(Ok());
        }