Change the method name from listAllConfirmedContributions to listAllContributions.

This commit is contained in:
elweyn 2022-07-14 16:45:19 +02:00
parent fdea5f68ef
commit cbbe0ffad2
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ export enum RIGHTS {
GDT_BALANCE = 'GDT_BALANCE',
CREATE_CONTRIBUTION = 'CREATE_CONTRIBUTION',
LIST_CONTRIBUTIONS = 'LIST_CONTRIBUTIONS',
LIST_ALL_CONFIRMED_CONTRIBUTIONS = 'LIST_ALL_CONFIRMED_CONTRIBUTIONS',
LIST_ALL_CONTRIBUTIONS = 'LIST_ALL_CONTRIBUTIONS',
// Admin
SEARCH_USERS = 'SEARCH_USERS',
SET_USER_ROLE = 'SET_USER_ROLE',

View File

@ -25,7 +25,7 @@ export const ROLE_USER = new Role('user', [
RIGHTS.GDT_BALANCE,
RIGHTS.CREATE_CONTRIBUTION,
RIGHTS.LIST_CONTRIBUTIONS,
RIGHTS.LIST_ALL_CONFIRMED_CONTRIBUTIONS,
RIGHTS.LIST_ALL_CONTRIBUTIONS,
])
export const ROLE_ADMIN = new Role('admin', Object.values(RIGHTS)) // all rights

View File

@ -65,9 +65,9 @@ export class ContributionResolver {
return contributions.map((contribution) => new Contribution(contribution, new User(user)))
}
@Authorized([RIGHTS.LIST_ALL_CONFIRMED_CONTRIBUTIONS])
@Authorized([RIGHTS.LIST_ALL_CONTRIBUTIONS])
@Query(() => ContributionListResult)
async listAllConfirmedContributions(
async listAllContributions(
@Args()
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
): Promise<ContributionListResult> {