Remove serverless functions from settings (#9105)
closes https://github.com/twentyhq/twenty/issues/8727 @Bonapara wants to keep the code for now so I ended up by setting the `isFunctionSettingsEnabled` constants to false in the codebase
This commit is contained in:
@ -38,7 +38,7 @@ export const seedFeatureFlags = async (
|
|||||||
{
|
{
|
||||||
key: FeatureFlagKey.IsFunctionSettingsEnabled,
|
key: FeatureFlagKey.IsFunctionSettingsEnabled,
|
||||||
workspaceId: workspaceId,
|
workspaceId: workspaceId,
|
||||||
value: true,
|
value: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: FeatureFlagKey.IsWorkflowEnabled,
|
key: FeatureFlagKey.IsWorkflowEnabled,
|
||||||
|
|||||||
@ -35,17 +35,16 @@ export class ServerlessFunctionResolver {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
async checkFeatureFlag(workspaceId: string) {
|
async checkFeatureFlag(workspaceId: string) {
|
||||||
const isFunctionSettingsEnabled =
|
const isWorkflowEnabled = await this.featureFlagRepository.findOneBy({
|
||||||
await this.featureFlagRepository.findOneBy({
|
workspaceId,
|
||||||
workspaceId,
|
key: FeatureFlagKey.IsWorkflowEnabled,
|
||||||
key: FeatureFlagKey.IsFunctionSettingsEnabled,
|
value: true,
|
||||||
value: true,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
if (!isFunctionSettingsEnabled) {
|
if (!isWorkflowEnabled) {
|
||||||
throw new ServerlessFunctionException(
|
throw new ServerlessFunctionException(
|
||||||
`IS_FUNCTION_SETTINGS_ENABLED feature flag is not set to true for this workspace`,
|
`IS_WORKFLOW_ENABLED feature flag is not set to true for this workspace`,
|
||||||
ServerlessFunctionExceptionCode.SERVERLESS_FUNCTION_NOT_FOUND,
|
ServerlessFunctionExceptionCode.FEATURE_FLAG_INVALID,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user