public async Task <JsonResult> PutInsertQuiz([FromBody] Quiz quiz) { var result = await quizManager.InsertQuiz(Token.UserId, quiz); switch (result.Status) { case SaveQuizResultStatus.NotAuthorized: return(ControllerHelper.CreateErrorResponse(HttpStatusCode.Unauthorized, "Unauthorized")); case SaveQuizResultStatus.GeneralError: return(ControllerHelper.CreateErrorResponse(HttpStatusCode.NotAcceptable, "GeneralError")); default: return(ControllerHelper.CreateResponse(result.Result)); } }