Beispiel #1
0
        public async Task <IActionResult> AwaitingMatch()
        {
            var userId = User.GetUserId();

            await _loggingService.SaveAuditLog($"Creating awating match for user with user id {userId}",
                                               AuditActionEnum.Create);

            var isAddedToQueueOfAwaitingMatches = await _matchService.AddToAwaitingMatch(userId);

            if (!isAddedToQueueOfAwaitingMatches)
            {
                return(BadRequest("Der gik noget galt."));
            }

            return(Ok("Der er ikke nogle tilgængelige matches til dig lige nu. Vi arbejder på højtryk for at finde et!"));
        }