Update backend/src/graphql/resolver/UserResolver.ts

Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
This commit is contained in:
Ulf Gebhardt 2023-02-02 02:03:55 +01:00 committed by GitHub
parent dce2abf1c3
commit 2cbf01b8df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -778,7 +778,7 @@ export class UserResolver {
async unDeleteUser(@Arg('userId', () => Int) userId: number): Promise<Date | null> {
const user = await DbUser.findOne({ id: userId }, { withDeleted: true })
if (!user) {
throw new LogError(`Could not find user with userId: ${userId}`, userId)
throw new LogError('Could not find user with given ID', userId)
}
if (!user.deletedAt) {
throw new LogError('User is not deleted')