Skip to content

Commit 9941568

Browse files
authored
Merge pull request #300 from mbramani/fix/remove-feature-flag-onboarding-extension
chore: remove feature flag onboarding extension command
1 parent 5659f90 commit 9941568

File tree

5 files changed

+2
-27
lines changed

5 files changed

+2
-27
lines changed

src/constants/commands.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,5 @@ export const ONBOARDING_EXTENSION = {
240240
type: 6,
241241
required: false,
242242
},
243-
{
244-
name: "dev",
245-
description: "Feature flag",
246-
type: 5,
247-
required: false,
248-
},
249243
],
250244
};

src/controllers/onboardingExtensionCommand.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,8 @@ export async function onboardingExtensionCommand(
2222
env: env,
2323
ctx: ExecutionContext
2424
) {
25-
const dev = transformedArgument.devObj?.value || false;
2625
const discordId = transformedArgument.memberObj.user.id.toString();
2726

28-
if (!dev) {
29-
return discordTextResponse(`<@${discordId}> Feature not implemented`);
30-
}
31-
3227
const args: CreateOnboardingExtensionArgs = {
3328
channelId: transformedArgument.channelId,
3429
userId: transformedArgument.userIdObj?.value,

src/utils/onboardingExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const createOnboardingExtension = async (
4040

4141
const userDiscordId = args.userId ? args.userId : args.discordId;
4242
const base_url = config(env).RDS_BASE_API_URL;
43-
const createOnboardingExtensionUrl = `${base_url}/requests?dev=true`;
43+
const createOnboardingExtensionUrl = `${base_url}/requests`;
4444

4545
const requestBody = {
4646
userId: userDiscordId,

tests/unit/handlers/onboardingExtension.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,6 @@ describe("onboardingExtensionCommand", () => {
1717
const discordId =
1818
transformedArgsForOnboardingExtension.memberObj.user.id.toString();
1919

20-
it("should return Feature not implemented", async () => {
21-
const expectedRes = await onboardingExtensionCommand(
22-
transformedArgsForOnboardingExtension,
23-
guildEnv,
24-
ctx
25-
);
26-
const jsonResponse = await expectedRes.json();
27-
const mockResponse = discordTextResponse(
28-
`<@${discordId}> Feature not implemented`
29-
);
30-
const mockJsonResponse = await mockResponse.json();
31-
expect(jsonResponse).toStrictEqual(mockJsonResponse);
32-
});
33-
3420
it("should return initial response", async () => {
3521
transformedArgsForOnboardingExtension.devObj.value = true;
3622
const expectedRes = await onboardingExtensionCommand(

tests/unit/utils/onboardingExtension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe("createOnboaringExtension", () => {
2020
};
2121
const discordReplyUrl = `${DISCORD_BASE_URL}/channels/${args.channelId}/messages`;
2222
const base_url = config(env).RDS_BASE_API_URL;
23-
const createOnboardingExtensionUrl = `${base_url}/requests?dev=true`;
23+
const createOnboardingExtensionUrl = `${base_url}/requests`;
2424
let fetchSpy: jest.SpyInstance;
2525
let authToken: string;
2626

0 commit comments

Comments
 (0)