Mercurial > hg > Members > nobuyasu > Consensus
changeset 79:11dc5846b8c7 draft
implemented getLatestClaimsAndRequest method
author | one |
---|---|
date | Fri, 08 Mar 2013 17:21:47 +0900 |
parents | f744331287ea |
children | 712422332f3d |
files | app/controllers/User.java app/models/UserModel.java conf/routes |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/User.java Fri Mar 08 17:15:34 2013 +0900 +++ b/app/controllers/User.java Fri Mar 08 17:21:47 2013 +0900 @@ -80,7 +80,7 @@ } } - public static Result getLatestUserConsensus(String name) { + public static Result getUserLatestConsensus(String name) { TPGraph tpGraph = TPGraph.getInstance(); Vertex v = tpGraph.getVertex(name); if (v == null) {
--- a/app/models/UserModel.java Fri Mar 08 17:15:34 2013 +0900 +++ b/app/models/UserModel.java Fri Mar 08 17:21:47 2013 +0900 @@ -66,9 +66,8 @@ } public HashSet<Object> getLatestClaimsAndRequests() { - Object[] requests = getUserRequests(); - - Object[] claims = getUserClaims(); + Object[] requests = getLatestUserRequests(); + Object[] claims = getLatestUserClaims(); return makeSet(requests, claims); }
--- a/conf/routes Fri Mar 08 17:15:34 2013 +0900 +++ b/conf/routes Fri Mar 08 17:21:47 2013 +0900 @@ -20,6 +20,10 @@ POST /claims/:mentionType/:id/create controllers.Claim.createMention(mentionType: String ,id: String) POST /claims/edit/:id controllers.Claim.editClaim(id: String) +# latest +GET /users/latest/consensus/:name controllers.User.getUserLatestConsensus(name: String) + + GET /reset controllers.Claim.reset() # test action