fix wrong striked_at date when querying
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m32s
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m32s
This commit is contained in:
parent
8ccff82fd3
commit
366913c5b3
@ -17,7 +17,7 @@ export const GET = (async ({ url }) => {
|
|||||||
where: { reported_id: user.id },
|
where: { reported_id: user.id },
|
||||||
attributes: [
|
attributes: [
|
||||||
[sequelize.fn('SUM', sequelize.col('strike_reason.weight')), 'weight'],
|
[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' }
|
include: { model: StrikeReason, as: 'strike_reason' }
|
||||||
})) as { weight: number | null; striked_at: Date | null } | null;
|
})) as { weight: number | null; striked_at: Date | null } | null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user