Skip to content

Commit a5c84a8

Browse files
committed
Updated the backend route to /aws/groups/access
1 parent 865d751 commit a5c84a8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/utils/awsAccess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function processAWSAccessRequest(
1919
);
2020
const discordReplyUrl = `${DISCORD_BASE_URL}/channels/${channelId}/messages`;
2121
const base_url = config(env).RDS_BASE_API_URL;
22-
const grantAWSAccessAPIUrl = `${base_url}/aws-access?dev=true`;
22+
const grantAWSAccessAPIUrl = `${base_url}/aws/groups/access?dev=true`;
2323

2424
try {
2525
const requestData = {

tests/unit/handlers/grantAwsAccessCommand.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe("ProcessAWSAccessRequest", () => {
5959
const fetchCalls: string[] = [];
6060
fetchSpy.mockImplementation((url, options) => {
6161
fetchCalls.push(`Fetch call to: ${url}`);
62-
if (url.includes("/aws-access")) {
62+
if (url.includes("/aws/groups/access")) {
6363
return Promise.resolve({ ok: true } as Response);
6464
} else if (url.includes("/channels/123456789/messages")) {
6565
return Promise.resolve({ ok: true } as Response);
@@ -77,15 +77,15 @@ describe("ProcessAWSAccessRequest", () => {
7777
expect(fetchSpy).toHaveBeenCalledTimes(2);
7878
expect(fetchCalls).toHaveLength(2);
7979

80-
expect(fetchCalls[0]).toContain("/aws-access");
80+
expect(fetchCalls[0]).toContain("/aws/groups/access");
8181
expect(fetchCalls[1]).toContain("/channels/123456789/messages");
8282
});
8383

8484
it("should handle API error", async () => {
8585
const fetchCalls: string[] = [];
8686
fetchSpy.mockImplementation((url, options) => {
8787
fetchCalls.push(`Fetch call to: ${url}`);
88-
if (url.includes("/aws-access")) {
88+
if (url.includes("/aws/groups/access")) {
8989
return Promise.resolve({
9090
ok: false,
9191
status: 500,
@@ -107,7 +107,7 @@ describe("ProcessAWSAccessRequest", () => {
107107
expect(fetchSpy).toHaveBeenCalledTimes(2);
108108
expect(fetchCalls).toHaveLength(2);
109109

110-
expect(fetchCalls[0]).toContain("/aws-access");
110+
expect(fetchCalls[0]).toContain("/aws/groups/access");
111111
expect(fetchCalls[1]).toContain("/channels/123456789/messages");
112112
});
113113
});

0 commit comments

Comments
 (0)