Esempio n. 1
0
        public async Task <IActionResult> CreateAsync([FromBody] NewMeeting newMeeting)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var successful = await _meetingService.AddMeetingAsync(newMeeting);

            if (!successful)
            {
                return(BadRequest(new { error = "Could not add item." }));
            }

            return(Ok(successful));
        }