Skip to content

Commit

Permalink
Remove serverless functions from settings (#9105)
Browse files Browse the repository at this point in the history
closes #8727

@Bonapara wants to keep the code for now so I ended up by setting the
`isFunctionSettingsEnabled` constants to false in the codebase
  • Loading branch information
martmull authored Dec 17, 2024
1 parent b033a50 commit e492efb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const seedFeatureFlags = async (
{
key: FeatureFlagKey.IsFunctionSettingsEnabled,
workspaceId: workspaceId,
value: true,
value: false,
},
{
key: FeatureFlagKey.IsWorkflowEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,16 @@ export class ServerlessFunctionResolver {
) {}

async checkFeatureFlag(workspaceId: string) {
const isFunctionSettingsEnabled =
await this.featureFlagRepository.findOneBy({
workspaceId,
key: FeatureFlagKey.IsFunctionSettingsEnabled,
value: true,
});
const isWorkflowEnabled = await this.featureFlagRepository.findOneBy({
workspaceId,
key: FeatureFlagKey.IsWorkflowEnabled,
value: true,
});

if (!isFunctionSettingsEnabled) {
if (!isWorkflowEnabled) {
throw new ServerlessFunctionException(
`IS_FUNCTION_SETTINGS_ENABLED feature flag is not set to true for this workspace`,
ServerlessFunctionExceptionCode.SERVERLESS_FUNCTION_NOT_FOUND,
`IS_WORKFLOW_ENABLED feature flag is not set to true for this workspace`,
ServerlessFunctionExceptionCode.FEATURE_FLAG_INVALID,
);
}
}
Expand Down

0 comments on commit e492efb

Please sign in to comment.