Beispiel #1
0
        public async Task AcceptRequest(Request request)
        {
            switch (request.RequestType)
            {
            case RequestType.Friend:
                await _relationshipsService.AddFriend(request.SenderId, request.ReceiverId);

                await _requestsRepository.DeleteRequest(request.SenderId, request.ReceiverId, request.RequestType);

                break;
            }
        }
Beispiel #2
0
        public async Task <IActionResult> DeleteConfirm(int?id)
        {
            if (id == null)
            {
                return(StatusCode(StatusCodes.Status400BadRequest));
            }
            await repository.DeleteRequest((int)id);

            return(RedirectToAction("Index"));
        }