fix wrong striked_at date when querying
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m32s

This commit is contained in:
bytedream 2023-12-23 14:30:12 +01:00
parent 8ccff82fd3
commit 366913c5b3

View File

@ -17,7 +17,7 @@ export const GET = (async ({ url }) => {
where: { reported_id: user.id },
attributes: [
[sequelize.fn('SUM', sequelize.col('strike_reason.weight')), 'weight'],
'striked_at'
[sequelize.fn('MAX', sequelize.col('striked_at')), 'striked_at']
],
include: { model: StrikeReason, as: 'strike_reason' }
})) as { weight: number | null; striked_at: Date | null } | null;