mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
repository use Order Enum
This commit is contained in:
parent
d391aa3491
commit
175bffcc05
@ -1,4 +1,5 @@
|
|||||||
import { EntityRepository, Repository } from 'typeorm'
|
import { EntityRepository, Repository } from 'typeorm'
|
||||||
|
import { Order } from '../../graphql/enum/Order'
|
||||||
import { UserTransaction } from '../entity/UserTransaction'
|
import { UserTransaction } from '../entity/UserTransaction'
|
||||||
|
|
||||||
@EntityRepository(UserTransaction)
|
@EntityRepository(UserTransaction)
|
||||||
@ -7,7 +8,7 @@ export class UserTransactionRepository extends Repository<UserTransaction> {
|
|||||||
userId: number,
|
userId: number,
|
||||||
limit: number,
|
limit: number,
|
||||||
offset: number,
|
offset: number,
|
||||||
order: 'ASC' | 'DESC',
|
order: Order,
|
||||||
): Promise<[UserTransaction[], number]> {
|
): Promise<[UserTransaction[], number]> {
|
||||||
return this.createQueryBuilder('userTransaction')
|
return this.createQueryBuilder('userTransaction')
|
||||||
.where('userTransaction.userId = :userId', { userId })
|
.where('userTransaction.userId = :userId', { userId })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user