forked from kaverti/website
Fix mistake in Marketplace Transaction logging
This commit is contained in:
parent
7fa38df69a
commit
bd20714b60
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue