Skip to content

Commit 8d6a58b

Browse files
committed
Guard DISCORD_BASE_URL to avoid invalid URL in tests
1 parent 17185a2 commit 8d6a58b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/discordMembersService.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const jwt = require("jsonwebtoken");
22
const config = require("config");
3-
const DISCORD_BASE_URL = config.get("services.discordBot.baseUrl");
3+
4+
const rawBaseUrl = config.get("services.discordBot.baseUrl");
5+
const DISCORD_BASE_URL = rawBaseUrl && rawBaseUrl !== "DISCORD_BASE_URL" ? rawBaseUrl : "http://localhost:8080";
46

57
/**
68
* Extracts the discord data of a user

0 commit comments

Comments
 (0)