Commit 15a13d1f authored by Akhmad Fakhoni Listiyan Dede's avatar Akhmad Fakhoni Listiyan Dede
Browse files

Cancel offer fixed

parent 2af35b86
......@@ -585,7 +585,7 @@ public class Database {
{
MongoCollection<Document> collection = database.getCollection("tradebox");
try {
JSONObject data = new JSONObject(collection.find(eq("_id", new ObjectId(offer_token))));
JSONObject data = new JSONObject(collection.find(eq("_id", new ObjectId(offer_token))).first().toJson());
if(isAvailable(offer_token)) //If isavailable untuk dicancel
{
......
......@@ -79,8 +79,9 @@ public class Message {
// System.out.println(move("553cd35d3c892b2c6768f77d", 4, 4));
// System.out.println(receive("{\"method\":\"field\",\"token\":\"553cd35d3c892b2c6768f77d\"}"));
// System.out.println(receive("{\"method\":\"inventory\",\"token\":\"553cd35d3c892b2c6768f77d\"}"));
System.out.println(login("ja","j"));
// System.out.println(login("ja","j"));
// System.out.println(receive("{\"method\": \"canceloffer\",\"token\": \"553cf0913c892b417db5bd82\",\"offer_token\": \"553cf11f3c892b417db5bd83\"}"));
System.out.println("cancel: " + cancelOffer("553cd35d3c892b2c6768f77d", "553cdce03c892b37e1ce2493"));
}
public static String callURL(String myURL) {
......
Supports Markdown
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