mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
15 lines
329 B
TypeScript
15 lines
329 B
TypeScript
import { Transaction as DbTransaction } from '@entity/Transaction'
|
|
|
|
export const getLastTransaction = async (
|
|
userId: number,
|
|
relations?: string[],
|
|
): Promise<DbTransaction | undefined> => {
|
|
return DbTransaction.findOne(
|
|
{ userId },
|
|
{
|
|
order: { balanceDate: 'DESC', id: 'DESC' },
|
|
relations,
|
|
},
|
|
)
|
|
}
|