Skip to content

Commit f95a299

Browse files
moved string to constant file
1 parent aca37fa commit f95a299

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/constants/responses.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ export const RETRY_COMMAND =
2525
export const ROLE_ADDED = "Role added successfully";
2626

2727
export const NAME_CHANGED = "User nickname changed successfully";
28+
29+
export const VERIFICATION_STRING =
30+
"Like to verify yourself? click the above link and authorize real dev squad to manage your discord data";

src/constants/urls.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
export const RDS_BASE_API_URL = "https://api.realdevsquad.com";
2-
export const RDS_BASE_STAGING_API_URL = "https://staging-api.realdevsquad.com";
3-
export const RDS_BASE_DEVELOPMENT_API_URL = "YOUR_LOCAL_API_URL"; // If needed, modify the URL to your local API server
1+
export const RDS_BASE_API_URL = "https://66ea-103-77-42-188.ngrok-free.app";
2+
export const RDS_BASE_STAGING_API_URL =
3+
"https://66ea-103-77-42-188.ngrok-free.app";
4+
export const RDS_BASE_DEVELOPMENT_API_URL =
5+
"https://66ea-103-77-42-188.ngrok-free.app"; // If needed, modify the URL to your local API server
46

57
export const DISCORD_BASE_URL = "https://discord.com/api/v10";
68
export const DISCORD_AVATAR_BASE_URL = "https://cdn.discordapp.com/avatars";

src/controllers/verifyCommand.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import config from "../../config/config";
2-
import { RETRY_COMMAND } from "../constants/responses";
2+
import { RETRY_COMMAND, VERIFICATION_STRING } from "../constants/responses";
33
import { env } from "../typeDefinitions/default.types";
44
import { discordEphemeralResponse } from "../utils/discordEphemeralResponse";
55
import { generateUniqueToken } from "../utils/generateUniqueToken";
@@ -13,9 +13,6 @@ export async function verifyCommand(
1313
env: env
1414
) {
1515
const token = await generateUniqueToken();
16-
const verificationString =
17-
"Like to verify yourself? click the above link and authorize real dev squad to manage your discord data";
18-
1916
const response = await sendUserDiscordData(
2017
token,
2118
userId,
@@ -27,7 +24,7 @@ export async function verifyCommand(
2724
if (response?.status === 201 || response?.status === 200) {
2825
const verificationSiteURL = config(env).VERIFICATION_SITE_URL;
2926
const message =
30-
`${verificationSiteURL}/discord?token=${token}\n` + verificationString;
27+
`${verificationSiteURL}/discord?token=${token}\n` + VERIFICATION_STRING;
3128
return discordEphemeralResponse(message);
3229
} else {
3330
return discordEphemeralResponse(RETRY_COMMAND);

0 commit comments

Comments
 (0)