From 38e04b49799a5f16dd8dfa078e57b40a8a48ef08 Mon Sep 17 00:00:00 2001 From: elweyn Date: Mon, 27 Jun 2022 17:12:59 +0200 Subject: [PATCH] Remove checks on users since the authorization token handels it. --- backend/src/graphql/resolver/ContributionResolver.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/backend/src/graphql/resolver/ContributionResolver.ts b/backend/src/graphql/resolver/ContributionResolver.ts index 0f516dc7c..f02e52ad8 100644 --- a/backend/src/graphql/resolver/ContributionResolver.ts +++ b/backend/src/graphql/resolver/ContributionResolver.ts @@ -16,15 +16,6 @@ export class ContributionResolver { @Ctx() context: Context, ): Promise { const user = getUser(context) - if (!user) { - throw new Error(`Could not find user`) - } - if (user.deletedAt) { - throw new Error('This user was deleted. Cannot create a contribution.') - } - if (!user.emailChecked) { - throw new Error('Contribution could not be saved, Email is not activated') - } const creations = await getUserCreation(user.id) logger.trace('creations', creations) const creationDateObj = new Date(creationDate)