mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
13 lines
306 B
TypeScript
13 lines
306 B
TypeScript
import { Transaction as DbTransaction } from '../entity'
|
|
|
|
export const getLastTransaction = async (
|
|
userId: number,
|
|
relations?: string[],
|
|
): Promise<DbTransaction | null> => {
|
|
return DbTransaction.findOne({
|
|
where: { userId },
|
|
order: { balanceDate: 'DESC', id: 'DESC' },
|
|
relations,
|
|
})
|
|
}
|