fix query to use proper field

This commit is contained in:
Ulf Gebhardt 2022-02-21 01:46:01 +01:00
parent 270ccbf1cf
commit 3040992c51
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -287,7 +287,7 @@ async function getUserCreations(id: number): Promise<number[]> {
.where('transactions.user_id = :id', { id })
.andWhere('transactions.transaction_type_id = :type', { type: TransactionTypeId.CREATION })
.andWhere({
targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :endDate`, {
creationDate: Raw((alias) => `${alias} >= :date and ${alias} < :endDate`, {
date: dateBeforeLastMonth,
endDate: dateNextMonth,
}),