Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/constants/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,5 @@ export const ONBOARDING_EXTENSION = {
type: 6,
required: false,
},
{
name: "dev",
description: "Feature flag",
type: 5,
required: false,
},
],
};
5 changes: 0 additions & 5 deletions src/controllers/onboardingExtensionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@ export async function onboardingExtensionCommand(
env: env,
ctx: ExecutionContext
) {
const dev = transformedArgument.devObj?.value || false;
const discordId = transformedArgument.memberObj.user.id.toString();

if (!dev) {
return discordTextResponse(`<@${discordId}> Feature not implemented`);
}

const args: CreateOnboardingExtensionArgs = {
channelId: transformedArgument.channelId,
userId: transformedArgument.userIdObj?.value,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/onboardingExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const createOnboardingExtension = async (

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

const requestBody = {
userId: userDiscordId,
Expand Down
14 changes: 0 additions & 14 deletions tests/unit/handlers/onboardingExtension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ describe("onboardingExtensionCommand", () => {
const discordId =
transformedArgsForOnboardingExtension.memberObj.user.id.toString();

it("should return Feature not implemented", async () => {
const expectedRes = await onboardingExtensionCommand(
transformedArgsForOnboardingExtension,
guildEnv,
ctx
);
const jsonResponse = await expectedRes.json();
const mockResponse = discordTextResponse(
`<@${discordId}> Feature not implemented`
);
const mockJsonResponse = await mockResponse.json();
expect(jsonResponse).toStrictEqual(mockJsonResponse);
});

it("should return initial response", async () => {
transformedArgsForOnboardingExtension.devObj.value = true;
const expectedRes = await onboardingExtensionCommand(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/utils/onboardingExtension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("createOnboaringExtension", () => {
};
const discordReplyUrl = `${DISCORD_BASE_URL}/channels/${args.channelId}/messages`;
const base_url = config(env).RDS_BASE_API_URL;
const createOnboardingExtensionUrl = `${base_url}/requests?dev=true`;
const createOnboardingExtensionUrl = `${base_url}/requests`;
let fetchSpy: jest.SpyInstance;
let authToken: string;

Expand Down
Loading