getPendingCreations excludes confirmed contributions

This commit is contained in:
Moriz Wahl 2022-06-02 08:43:30 +02:00
parent 08f72e2777
commit d048a00143

View File

@ -281,7 +281,7 @@ export class AdminResolver {
@Authorized([RIGHTS.SEARCH_PENDING_CREATION])
@Query(() => [PendingContribution])
async getPendingCreations(): Promise<PendingContribution[]> {
const contributions = await Contribution.find()
const contributions = await Contribution.find({ where: { confirmedAt: IsNull() } })
if (contributions.length === 0) {
return []
}