Remove checks on users since the authorization token handels it.

This commit is contained in:
elweyn 2022-06-27 17:12:59 +02:00
parent 4d4f6979da
commit 38e04b4979

View File

@ -16,15 +16,6 @@ export class ContributionResolver {
@Ctx() context: Context,
): Promise<boolean> {
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)