Fix mistake in Marketplace Transaction logging

This commit is contained in:
Troplo 2020-11-18 21:07:23 +11:00
parent 7fa38df69a
commit bd20714b60
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ router.get('/purchase/:id', auth, async(req, res, next) => {
const UserId = user.id
const priceTotal = marketplace.price
await user.removeKoins(priceTotal)
await Transaction.create({UserId: UserId, priceOfPurchase: priceTotal, text: user.username + ' purchased ' + marketplace.name + ' (' + marketplace.id + ') from the Marketplace for ' + priceTotal, itemId: marketplace.id, limited: marketplace.limited, ipId: Ip.createIfNotExists(req.ip, user)})
await Transaction.create({UserId: UserId, priceOfPurchase: priceTotal, text: user.username + ' purchased ' + marketplace.name + ' (' + marketplace.id + ') from the Marketplace for ' + priceTotal + ' koins', itemId: marketplace.id, limited: marketplace.limited, ipId: Ip.createIfNotExists(req.ip, user)})
await Inventory.create({UserId: UserId, purchasePrice: priceTotal, isReselling: false, isResellingPrice: 0, ItemId: marketplace.id, boughtFrom: marketplace.UserId, resellType: 0, auctionId: 0})
res.status(200)
res.json({success: true})