Skip to content
Open
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
8 changes: 4 additions & 4 deletions services/discord/discord.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
}
}

async fetch({ serverId }) {
const url = `https://discord.com/api/v6/guilds/${serverId}/widget.json`
async fetch({ apiBaseUrl, serverId }) {
const url = `${apiBaseUrl ?? "https://discord.com/api/v6"}/guilds/${serverId}/widget.json`

Check failure on line 63 in services/discord/discord.service.js

View workflow job for this annotation

GitHub Actions / test-lint

Replace `"https://discord.com/api/v6"` with `'https://discord.com/api/v6'`
return this._requestJson(
this.authHelper.withBearerAuthHeader(
{
Expand All @@ -76,8 +76,8 @@
)
}

async handle({ serverId }) {
const data = await this.fetch({ serverId })
async handle({ apiBaseUrl, serverId }) {
const data = await this.fetch({ apiBaseUrl, serverId })
return this.constructor.render({ members: data.presence_count })
}
}
Loading