mirror of
https://github.com/logto-io/logto.git
synced 2025-02-24 22:05:56 -05:00
fix(core): allow empty condition in logs (#991)
This commit is contained in:
parent
b61f70fe01
commit
28198590fa
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ const buildLogConditionSql = (logCondition: LogCondition) =>
|
|||
),
|
||||
].filter(({ sql }) => sql);
|
||||
|
||||
return sql`where ${sql.join(subConditions, sql` and `)}`;
|
||||
return subConditions.length > 0 ? sql`where ${sql.join(subConditions, sql` and `)}` : sql``;
|
||||
});
|
||||
|
||||
export const countLogs = async (condition: LogCondition) =>
|
||||
|
|
Loading…
Add table
Reference in a new issue