Commit 13bb654a authored by Akhmad Fakhoni Listiyan Dede's avatar Akhmad Fakhoni Listiyan Dede
Browse files

Editing saveOfferToTradebox. Tadinya ada attribut yang kurang. Now Ok

parent f4e9e9c3
......@@ -302,12 +302,13 @@ public class Database {
if(inv.get(indexOfferedItem) >= nOffered) //Jika jumlah item yang ditawarkan cukup
MongoCollection<Document> collection = database.getCollection("offers");
Document offerDoc = new Document("token", token)
MongoCollection<Document> collection = database.getCollection("tradebox");
Document offerDoc = new Document("usertoken", token)
.append("offered_item", indexOfferedItem)
.append("n1", nOffered)
.append("demanded_item", indexDemandedItem)
.append("n2", nDemanded);
.append("n1", nOffered)
.append("demanded_item", indexDemandedItem)
.append("n2", nDemanded)
.append("availability", false);
//Update inventory
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