Beispiel #1
0
        public async Task <IActionResult> AddTopic([FromBodyAttribute] ResponseData.TopicIgnoreUniqId topic)
        {
            try
            {
                await _quizManager.AddTopicAsync(topic);
            }
            catch (Exception ex)
            {
                _loggerTopic.LogCritical($"AddTopic{ex}");
                return(BadRequest());
            }

            // Response.Headers.Add("Location", ""); // TODO send new objectid
            return(new StatusCodeResult((int)HttpStatusCode.Created));
        }