0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(schemas): use pool.query to tolerate empty query results (#4241)

This commit is contained in:
Darcy Ye 2023-07-25 23:50:47 +08:00 committed by GitHub
parent 7814f098a8
commit 24612e2706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ type CloudConnectionConfig = {
const alteration: AlterationScript = {
up: async (pool) => {
const rows = await pool.many<Application>(
const { rows } = await pool.query<Application>(
sql`select * from applications where type = ${ApplicationType.MachineToMachine} and tenant_id = ${adminTenantId} and name = ${cloudServiceApplicationName}`
);