Beispiel #1
0
        public IActionResult PostJob([FromBody] QuestionsModel Model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (!_questionsRepository.CreateQuestions(Model))
            {
                ModelState.AddModelError("", $"Something went wrong saving the job " +
                                         $"{Model.Id}");
                return(StatusCode(500, ModelState));
            }

            return(Ok(new { questionCreated = true }));
        }