mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(core): refine query
This commit is contained in:
parent
08c5771a85
commit
17d72c8564
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ export const createResourceQueries = (pool: CommonQueryMethods) => {
|
||||||
await connection.query(sql`
|
await connection.query(sql`
|
||||||
update ${table}
|
update ${table}
|
||||||
set ${fields.isDefault}=false
|
set ${fields.isDefault}=false
|
||||||
where ${fields.id}!=${id};
|
where ${fields.isDefault}=true;
|
||||||
`);
|
`);
|
||||||
const returning = await connection.maybeOne<Resource>(sql`
|
const returning = await connection.maybeOne<Resource>(sql`
|
||||||
update ${table}
|
update ${table}
|
||||||
|
|
Loading…
Reference in a new issue