mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Remove checks on users since the authorization token handels it.
This commit is contained in:
parent
4d4f6979da
commit
38e04b4979
@ -16,15 +16,6 @@ export class ContributionResolver {
|
|||||||
@Ctx() context: Context,
|
@Ctx() context: Context,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const user = getUser(context)
|
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)
|
const creations = await getUserCreation(user.id)
|
||||||
logger.trace('creations', creations)
|
logger.trace('creations', creations)
|
||||||
const creationDateObj = new Date(creationDate)
|
const creationDateObj = new Date(creationDate)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user