mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Throw error if confirmedAt is present.
This commit is contained in:
parent
d5a2c24d7e
commit
b4a4a9e126
@ -52,6 +52,9 @@ export class ContributionResolver {
|
||||
if (contribution.userId !== user.id) {
|
||||
throw new Error('Can not delete contribution of another user')
|
||||
}
|
||||
if (contribution.confirmedAt) {
|
||||
throw new Error('A confirmed contribution can not be deleted')
|
||||
}
|
||||
const res = await contribution.softRemove()
|
||||
return !!res
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user