show user history in admin panel

This commit is contained in:
Phillip Thelen
2024-08-28 13:42:19 +02:00
parent 38cad7102f
commit 0bd0ba096b
8 changed files with 292 additions and 7 deletions

View File

@@ -504,7 +504,7 @@ api.buy = {
await user.save();
if (type === 'armoire') {
await UserHistory.beginUserHistoryUpdate(user._id)
await UserHistory.beginUserHistoryUpdate(user._id, req.headers['x-client'])
.withArmoire(buyRes[0].armoire.dropKey || 'experience')
.commit();
}
@@ -601,7 +601,7 @@ api.buyArmoire = {
}
const buyArmoireResponse = await common.ops.buy(user, req, res.analytics);
await user.save();
await UserHistory.beginUserHistoryUpdate(user._id)
await UserHistory.beginUserHistoryUpdate(user._id, req.headers['x-client'])
.withArmoire(buyArmoireResponse[1].data.armoire.dropKey)
.commit();
res.respond(200, ...buyArmoireResponse);