コード例 #1
0
        public IActionResult Edit([FromBody] Question incomingQuestion)
        {
            // Update the question with specific ID
            Question editReturn = _query.EditById(incomingQuestion);

            // If no question at that id, return error
            if (editReturn == null)
            {
                return(BadRequest("No question exists with ID " + incomingQuestion.questionid));
            }
            else
            {
                return(Ok(editReturn));
            }
        }