0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

chore: remove feature guard (#6818)

This commit is contained in:
wangsijie 2024-11-19 11:54:32 +08:00 committed by GitHub
parent 9ca5ae8f30
commit 9a3f78d342
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 5 additions and 43 deletions

View file

@ -3,9 +3,6 @@
{
"name": "Account center",
"description": "Customize your account API settings."
},
{
"name": "Dev feature"
}
],
"paths": {

View file

@ -3,9 +3,6 @@
{
"name": "Account",
"description": "Account routes provide functionality for managing user profile for the end user to interact directly with access tokens."
},
{
"name": "Dev feature"
}
],
"paths": {

View file

@ -9,7 +9,6 @@ import { z } from 'zod';
import koaGuard from '#src/middleware/koa-guard.js';
import { EnvSet } from '../../env-set/index.js';
import RequestError from '../../errors/RequestError/index.js';
import { encryptUserPassword } from '../../libraries/user.utils.js';
import assertThat from '../../utils/assert-that.js';
@ -35,10 +34,6 @@ export default function accountRoutes<T extends UserRouter>(...args: RouterInitA
router.use(koaAccountCenter(queries));
if (!EnvSet.values.isDevFeaturesEnabled) {
return;
}
router.get(
`${accountApiPrefix}`,
koaGuard({

View file

@ -98,9 +98,7 @@ const createRouters = (tenant: TenantContext) => {
ssoConnectors(managementRouter, tenant);
systemRoutes(managementRouter, tenant);
subjectTokenRoutes(managementRouter, tenant);
if (EnvSet.values.isDevFeaturesEnabled) {
accountCentersRoutes(managementRouter, tenant);
}
const anonymousRouter: AnonymousRouter = new Router();

View file

@ -51,12 +51,7 @@ const managementApiIdentifiableEntityNames = Object.freeze([
/** Additional tags that cannot be inferred from the path. */
const additionalTags = Object.freeze(
condArray<string>(
'Organization applications',
'Custom UI assets',
'Organization users',
EnvSet.values.isDevFeaturesEnabled && 'Account center'
)
condArray<string>('Organization applications', 'Custom UI assets', 'Organization users')
);
export const buildManagementApiBaseDocument = (

View file

@ -3,9 +3,6 @@
{
"name": "Verifications",
"description": "Endpoints for creating and validating verification records, which can be used in Profile routes."
},
{
"name": "Dev feature"
}
],
"paths": {

View file

@ -12,7 +12,6 @@ import { z } from 'zod';
import koaGuard from '#src/middleware/koa-guard.js';
import { EnvSet } from '../../env-set/index.js';
import {
buildVerificationRecordByIdAndType,
insertVerificationRecord,
@ -31,10 +30,6 @@ export default function verificationRoutes<T extends UserRouter>(
) {
const { queries, libraries, sentinel } = tenantContext;
if (!EnvSet.values.isDevFeaturesEnabled) {
return;
}
router.post(
`${verificationApiPrefix}/password`,
koaGuard({

View file

@ -5,9 +5,6 @@ import {
getAccountCenter,
updateAccountCenter,
} from '#src/api/account-center.js';
import { devFeatureTest } from '#src/utils.js';
const { describe, it } = devFeatureTest;
describe('account center', () => {
beforeAll(async () => {

View file

@ -21,9 +21,7 @@ import {
signInAndGetUserApi,
} from '#src/helpers/profile.js';
import { enableAllPasswordSignInMethods } from '#src/helpers/sign-in-experience.js';
import { devFeatureTest, generateEmail, generatePhone } from '#src/utils.js';
const { describe, it } = devFeatureTest;
import { generateEmail, generatePhone } from '#src/utils.js';
const expectedError = {
code: 'account_center.filed_not_editable',

View file

@ -23,9 +23,7 @@ import {
signInAndGetUserApi,
} from '#src/helpers/profile.js';
import { enableAllPasswordSignInMethods } from '#src/helpers/sign-in-experience.js';
import { devFeatureTest, generateEmail, generatePhone } from '#src/utils.js';
const { describe, it } = devFeatureTest;
import { generateEmail, generatePhone } from '#src/utils.js';
describe('account (email and phone)', () => {
beforeAll(async () => {

View file

@ -14,13 +14,11 @@ import {
signInAndGetUserApi,
} from '#src/helpers/profile.js';
import { enableAllPasswordSignInMethods } from '#src/helpers/sign-in-experience.js';
import { devFeatureTest, generatePassword, generateUsername } from '#src/utils.js';
import { generatePassword, generateUsername } from '#src/utils.js';
import WebhookMockServer from '../hook/WebhookMockServer.js';
import { assertHookLogResult } from '../hook/utils.js';
const { describe, it } = devFeatureTest;
describe('account', () => {
const webHookMockServer = new WebhookMockServer(9999);
const webHookApi = new WebHookApiTest();

View file

@ -25,9 +25,6 @@ import {
signInAndGetUserApi,
} from '#src/helpers/profile.js';
import { enableAllPasswordSignInMethods } from '#src/helpers/sign-in-experience.js';
import { devFeatureTest } from '#src/utils.js';
const { describe, it } = devFeatureTest;
describe('account (social)', () => {
const state = 'fake_state';