mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
removed dangerous code
This commit is contained in:
parent
d15b9a7e3c
commit
854ce12d62
@ -394,9 +394,11 @@ export class UserResolver {
|
||||
await queryRunner.commitTransaction()
|
||||
} catch (e) {
|
||||
await queryRunner.rollbackTransaction()
|
||||
await rollbackAutoIncrement(queryRunner, LoginUser, `login_users`)
|
||||
await rollbackAutoIncrement(queryRunner, LoginUserBackup, `login_user_backups`)
|
||||
await rollbackAutoIncrement(queryRunner, DbUser, `state_users`)
|
||||
// TODO: Lets not do this?! What if state_users were never updated?
|
||||
// We would still roll back the autoincrement which would produce duplicate entries?!
|
||||
// await rollbackAutoIncrement(queryRunner, LoginUser, `login_users`)
|
||||
// await rollbackAutoIncrement(queryRunner, LoginUserBackup, `login_user_backups`)
|
||||
// await rollbackAutoIncrement(queryRunner, DbUser, `state_users`)
|
||||
throw e
|
||||
} finally {
|
||||
await queryRunner.release()
|
||||
@ -573,6 +575,7 @@ export class UserResolver {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
const rollbackAutoIncrement = async (
|
||||
queryRunner: QueryRunner,
|
||||
entity: typeof BaseEntity,
|
||||
@ -588,3 +591,4 @@ const rollbackAutoIncrement = async (
|
||||
throw new Error('Problems with reset auto increment: ' + error)
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user