Skip to content
Snippets Groups Projects

Error, UI fixed

Merged LeeYongJae requested to merge last into master
9 files
+ 63
134
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -32,7 +32,7 @@ router.post("/cancel", async (req, res) => {
console.error(err);
return;
}
transaction.buyerId = "";
transaction.buyerId = null;
transaction.on_transaction = false;
transaction.save();
res.json({ result: true });
@@ -43,7 +43,7 @@ router.post("/cancel", async (req, res) => {
}
});
router.post("/success", async (req, res) => {
router.post("/end", async (req, res) => {
console.log("POST - success start");
var sess = req.session;
var req_bookTitle = req.body.bookTitle;
@@ -68,8 +68,6 @@ router.post("/success", async (req, res) => {
book.stock--;
book.save();
});
// transaction.on_transaction = "";
// transaction.save();
res.json({ result: true });
}
);
@@ -119,7 +117,7 @@ router.post("/sell", async (req, res) => {
var transaction = new Transaction();
transaction.sellerId = sellerId;
transaction.buyerId = "";
transaction.buyerId = null;
transaction.bookTitle = book.title;
transaction.on_transaction = false;
book.stock++;
Loading