Skip to content
Snippets Groups Projects
Commit 30c490ec authored by Daniel Knapp's avatar Daniel Knapp
Browse files

get single interposed question

parent 70f92e7a
Branches
Tags
No related merge requests found
......@@ -269,7 +269,6 @@ public class QuestionController extends AbstractController {
return questionService.getInterposedQuestions(sessionKey);
}
<<<<<<< HEAD
@RequestMapping(value = "/session/{sessionKey}/interposed/{documentId}", method = RequestMethod.GET)
@ResponseBody
public final Question getInterposedQuestion(
......@@ -278,7 +277,7 @@ public class QuestionController extends AbstractController {
final HttpServletResponse response
) {
return questionService.getInterposedQuestion(sessionKey, documentId);
=======
}
@RequestMapping(value = "/session/{sessionkey}/interposed", method = RequestMethod.POST)
@ResponseBody
......@@ -299,7 +298,6 @@ public class QuestionController extends AbstractController {
response.setStatus(HttpStatus.BAD_REQUEST.value());
return;
>>>>>>> 83eba294f9a7f8a8250127f8b5673aff0fc04663
}
}
......@@ -1079,10 +1079,11 @@ public class CouchDBDao implements IDatabaseDao {
public Question getInterposedQuestion(String sessionKey, String documentId) {
try {
Document document = this.getDatabase().getDocument(documentId);
Document document = this.getDatabase().getDocument(documentId);
LOGGER.error("bla test" + document.toString());
if(document != null) {
Question question = (Question) JSONObject.toBean(document.getJSONObject().getJSONObject("value"), Question.class);
Question question = (Question) JSONObject.toBean(document.getJSONObject(), Question.class);
question.setQuestionType("interposed_question");
return question;
......
......@@ -56,8 +56,6 @@ public interface IQuestionService {
int getInterposedCount(String sessionKey);
List<Question> getInterposedQuestions(String sessionKey);
Question getInterposedQuestion(String sessionKey, String documentId);
List<InterposedQuestion> getInterposedQuestions(String sessionKey);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment