mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
what the fuck
This commit is contained in:
parent
d9b19fbfa0
commit
66bfd6c884
@ -7,10 +7,10 @@ interface FindContributionsOptions {
|
|||||||
order: Order
|
order: Order
|
||||||
currentPage: number
|
currentPage: number
|
||||||
pageSize: number
|
pageSize: number
|
||||||
withDeleted?: boolean
|
withDeleted?: boolean | null
|
||||||
relations?: string[]
|
relations?: string[] | null
|
||||||
userId?: number
|
userId?: number | null
|
||||||
statusFilter?: ContributionStatus[]
|
statusFilter?: ContributionStatus[] | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export const findContributions = async (
|
export const findContributions = async (
|
||||||
@ -18,6 +18,7 @@ export const findContributions = async (
|
|||||||
): Promise<[DbContribution[], number]> => {
|
): Promise<[DbContribution[], number]> => {
|
||||||
const { order, currentPage, pageSize, withDeleted, relations, userId, statusFilter } = {
|
const { order, currentPage, pageSize, withDeleted, relations, userId, statusFilter } = {
|
||||||
withDeleted: false,
|
withDeleted: false,
|
||||||
|
relations: [],
|
||||||
...options,
|
...options,
|
||||||
}
|
}
|
||||||
return DbContribution.findAndCount({
|
return DbContribution.findAndCount({
|
||||||
@ -25,7 +26,7 @@ export const findContributions = async (
|
|||||||
...(statusFilter && statusFilter.length && { contributionStatus: In(statusFilter) }),
|
...(statusFilter && statusFilter.length && { contributionStatus: In(statusFilter) }),
|
||||||
...(userId && { userId }),
|
...(userId && { userId }),
|
||||||
},
|
},
|
||||||
withDeleted: withDeleted,
|
withDeleted,
|
||||||
order: {
|
order: {
|
||||||
createdAt: order,
|
createdAt: order,
|
||||||
id: order,
|
id: order,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user