mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
fix(core): insert id when patch application (#3052)
This commit is contained in:
parent
8f61cf7161
commit
f298e1c296
1 changed files with 4 additions and 2 deletions
|
@ -18,9 +18,11 @@ export const createApplicationsRolesQueries = (pool: CommonQueryMethods) => {
|
|||
|
||||
const insertApplicationsRoles = async (applicationsRoles: CreateApplicationsRole[]) =>
|
||||
pool.query(sql`
|
||||
insert into ${table} (${fields.applicationId}, ${fields.roleId}) values
|
||||
insert into ${table} (${fields.id}, ${fields.applicationId}, ${fields.roleId}) values
|
||||
${sql.join(
|
||||
applicationsRoles.map(({ applicationId, roleId }) => sql`(${applicationId}, ${roleId})`),
|
||||
applicationsRoles.map(
|
||||
({ id, applicationId, roleId }) => sql`(${id}, ${applicationId}, ${roleId})`
|
||||
),
|
||||
sql`, `
|
||||
)}
|
||||
`);
|
||||
|
|
Loading…
Reference in a new issue