Mercurial > hg > Members > nobuyasu > Consensus
comparison app/controllers/Claim.java @ 38:a2abe67d7c7a
fix createMention action bug
author | one |
---|---|
date | Thu, 04 Oct 2012 01:05:19 +0900 |
parents | bc3ac73320f9 |
children | 870553e92e3e |
comparison
equal
deleted
inserted
replaced
37:bc3ac73320f9 | 38:a2abe67d7c7a |
---|---|
79 | 79 |
80 @BodyParser.Of(BodyParser.Json.class) | 80 @BodyParser.Of(BodyParser.Json.class) |
81 public static Result createMention(String mentionType, String id) { | 81 public static Result createMention(String mentionType, String id) { |
82 if ( !(mentionType.equals(NodeModel.L_QUESTION) | 82 if ( !(mentionType.equals(NodeModel.L_QUESTION) |
83 ||mentionType.equals(NodeModel.L_REFUTATION) | 83 ||mentionType.equals(NodeModel.L_REFUTATION) |
84 ||mentionType.equals(NodeModel.L_QUESTION))) { | 84 ||mentionType.equals(NodeModel.L_SUGGESTION))) { |
85 return badRequest("Wrong mention type."); | 85 return badRequest("Wrong mention type."); |
86 } | 86 } |
87 JsonNode json = request().body().asJson(); | 87 JsonNode json = request().body().asJson(); |
88 String author = json.findPath(NodeModel.L_AUTHOR).getTextValue(); // Author | 88 String author = json.findPath(NodeModel.L_AUTHOR).getTextValue(); // Author |
89 TPGraph tpGraph = TPGraph.getInstance(); | 89 TPGraph tpGraph = TPGraph.getInstance(); |