0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

feat(core): order connectors by enabled desc, id asc (#430)

This commit is contained in:
IceHe.xyz 2022-03-25 12:26:42 +08:00 committed by GitHub
parent 2a5e7550a9
commit 28625f6894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -30,6 +30,7 @@ describe('connector queries', () => {
const expectSql = sql`
select ${sql.join(Object.values(fields), sql`, `)}
from ${table}
order by ${fields.enabled} desc, ${fields.id} asc
`;
mockQuery.mockImplementationOnce(async (sql, values) => {

View file

@ -12,6 +12,7 @@ export const findAllConnectors = async () =>
pool.many<Connector>(sql`
select ${sql.join(Object.values(fields), sql`, `)}
from ${table}
order by ${fields.enabled} desc, ${fields.id} asc
`);
export const findConnectorById = async (id: string) =>