mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
refactor(core): disable org apis for non-dev envs (#4813)
This commit is contained in:
parent
fab18172c2
commit
6673996288
1 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,7 @@ import { type Optional, cond, yes } from '@silverhand/essentials';
|
|||
import { z } from 'zod';
|
||||
|
||||
import { type SearchOptions } from '#src/database/utils.js';
|
||||
import { EnvSet } from '#src/env-set/index.js';
|
||||
import RequestError from '#src/errors/RequestError/index.js';
|
||||
import koaGuard from '#src/middleware/koa-guard.js';
|
||||
import koaPagination from '#src/middleware/koa-pagination.js';
|
||||
|
@ -23,6 +24,11 @@ import organizationScopeRoutes from './scopes.js';
|
|||
import { errorHandler } from './utils.js';
|
||||
|
||||
export default function organizationRoutes<T extends AuthedRouter>(...args: RouterInitArgs<T>) {
|
||||
// Remove after the feature is ready
|
||||
if (!EnvSet.values.isDevFeaturesEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const [
|
||||
originalRouter,
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue