Exemplo n.º 1
0
        public async Task <IActionResult> Swipe(Swipe request)
        {
            var validationResult = _swipeValidator.Validate(request);

            if (!validationResult.IsValid)
            {
                return(StatusCode(400, validationResult.To400 <bool>()));
            }

            await _matchesService.Swipe(request);

            return(this.Return200Or500(new ApiResponse <bool>()
            {
                Data = true,
                SuccessMessage = "Successfully saved swipe",
                Sucess = true
            }));
        }