Created
July 19, 2011 22:02
-
-
Save notsoluckycharm/1093850 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a General Comment to the Mongo reporting collection | |
* Goal: Should be of similar nature to /webapp/../java/../pages/UserReport.java | |
* Accepts: email | |
* subject | |
url | |
comment | |
sig | |
tag | |
*/ | |
@POST | |
@Path("/comment") | |
@Produces(Array("application/json","text/json")) | |
def addComment(@JContext ui:UriInfo, postParams:MultivaluedMap[String,String] ):Envelope = { | |
val reportingCollection = Application.reportingCollection(); | |
/* val qp=ui.getQueryParameters(); | |
implicit val srcs:List[MultivaluedMap[String,String]]=List(postParams,qp) | |
val sendToMongo = MongoDBObject("email" ->getParam("email"), | |
"subject" -> getParam("subject"), | |
"comment" -> getParam("comment"), | |
"sig" -> getParam("sig"), | |
"tag" -> getParam("tag")) | |
reportingCollection.save(sendToMongo);*/ | |
Envelope(Created).body(Map("_id" -> "")) | |
//sendToMongo.get("_id") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment