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

chore: launch multiple app secrets

This commit is contained in:
Gao Sun 2024-07-27 23:59:36 +08:00
parent b188bb1619
commit dce56eeb3f
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -13,7 +13,6 @@ import { generateStandardId, generateStandardSecret } from '@logto/shared';
import { conditional } from '@silverhand/essentials'; import { conditional } from '@silverhand/essentials';
import { boolean, object, string, z } from 'zod'; import { boolean, object, string, z } from 'zod';
import { EnvSet } from '#src/env-set/index.js';
import RequestError from '#src/errors/RequestError/index.js'; import RequestError from '#src/errors/RequestError/index.js';
import koaGuard from '#src/middleware/koa-guard.js'; import koaGuard from '#src/middleware/koa-guard.js';
import koaPagination from '#src/middleware/koa-pagination.js'; import koaPagination from '#src/middleware/koa-pagination.js';
@ -27,6 +26,8 @@ import applicationCustomDataRoutes from './application-custom-data.js';
import { generateInternalSecret } from './application-secret.js'; import { generateInternalSecret } from './application-secret.js';
import { applicationCreateGuard, applicationPatchGuard } from './types.js'; import { applicationCreateGuard, applicationPatchGuard } from './types.js';
import { EnvSet } from '#src/src/env-set/index.js';
const includesInternalAdminRole = (roles: Readonly<Array<{ role: Role }>>) => const includesInternalAdminRole = (roles: Readonly<Array<{ role: Role }>>) =>
roles.some(({ role: { name } }) => name === InternalRole.Admin); roles.some(({ role: { name } }) => name === InternalRole.Admin);