public ActionResult <int> AddEvent(CreateEventRequest createRequest)
        {
            if (!_validator.Validate(createRequest))
            {
                return(BadRequest(new { error = "users must have a name and date" }));
            }

            var newLeapee = _eventRepository.AddEvent(createRequest.EventName, createRequest.EventDate);

            return(Created($"api/event/{newLeapee.Id}", newLeapee));
        }
        public ActionResult AddEvent(CreateEventRequest createRequest)
        {
            if (_validator.Validate(createRequest))
            {
                return(BadRequest(new { error = "users must have a name and event location" }));
            }

            var newEvent = _eventRepository.AddEvent(createRequest.Name,
                                                     createRequest.EventTime,
                                                     createRequest.EventLocation,
                                                     createRequest.NameOfEvent);

            return(Created($"api/event/{newEvent.Id}", newEvent));
        }
        public ActionResult AddEvent(CreateEventRequest createRequest)
        {
            if (_validator.Validate(createRequest))
            {
                return(BadRequest(new { error = "event must have a name" }));
            }

            var newEvent = _eventRepository.AddEvent(
                createRequest.EventName,
                createRequest.Description,
                createRequest.Date,
                createRequest.Location,
                createRequest.IsCorrected,
                createRequest.LeapeeId
                );

            return(Created($"api/events/{newEvent.Id}", newEvent));
        }