mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Continue fix RLS issue of updating user table
This commit is contained in:
parent
29ed803ae5
commit
dca9066f19
1 changed files with 6 additions and 8 deletions
|
|
@ -506,10 +506,9 @@ export function authRouter() {
|
|||
const updated = await AppDataSource.transaction(
|
||||
async (entityManager) => {
|
||||
await setClaims(entityManager, user.id)
|
||||
return getRepository(User).update(
|
||||
{ id: user.id },
|
||||
{ status: StatusType.Active }
|
||||
)
|
||||
return entityManager
|
||||
.getRepository(User)
|
||||
.update({ id: user.id }, { status: StatusType.Active })
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -626,10 +625,9 @@ export function authRouter() {
|
|||
const updated = await AppDataSource.transaction(
|
||||
async (entityManager) => {
|
||||
await setClaims(entityManager, user.id)
|
||||
return getRepository(User).update(
|
||||
{ id: user.id },
|
||||
{ password: hashedPassword }
|
||||
)
|
||||
return entityManager
|
||||
.getRepository(User)
|
||||
.update({ id: user.id }, { password: hashedPassword })
|
||||
}
|
||||
)
|
||||
if (!updated.affected) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue