Skip to content

Commit 6f5f5a4

Browse files
committed
fix: url
Signed-off-by: Jacob <kathund@proton.me>
1 parent c93edf3 commit 6f5f5a4

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ from a discord bot. This application uses [Discord.js v14](https://www.npmjs.com
3232
- App Name: `Spotify Manager`
3333
- App Description:
3434
`Control spotify via a discord bot! What could go wrong? Allow anyone to queue songs, manage playback status and more all from a discord bot.`
35-
- Redirect URIs: `http://localhost:18173/auth/callback`
35+
- Redirect URIs: `http://127.0.0.1:18173/auth/callback`
3636
- Which API/SDKs are you planning to use?: `Web API`
3737
4. Click on `Save`
3838

src/Spotify/Routes/auth/CallbackRoute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CallbackRoute extends Route {
2727
params.append('client_id', this.spotify.Application.config.spotifyClientId);
2828
params.append('grant_type', 'authorization_code');
2929
params.append('code', code);
30-
params.append('redirect_uri', `http://localhost:${this.spotify.Application.config.port}/auth/callback`);
30+
params.append('redirect_uri', `http://127.0.0.1:${this.spotify.Application.config.port}/auth/callback`);
3131
params.append('code_verifier', verifier!);
3232
const result = await fetch('https://accounts.spotify.com/api/token', {
3333
method: 'POST',

src/Spotify/Routes/auth/LoginRoute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AuthRoute extends Route {
1616
const params = new URLSearchParams();
1717
params.append('client_id', this.spotify.Application.config.spotifyClientId);
1818
params.append('response_type', 'code');
19-
params.append('redirect_uri', `http://localhost:${this.spotify.Application.config.port}/auth/callback`);
19+
params.append('redirect_uri', `http://127.0.0.1:${this.spotify.Application.config.port}/auth/callback`);
2020
params.append('scope', this.spotify.scopes.join(' '));
2121
params.append('code_challenge_method', 'S256');
2222
params.append('code_challenge', challenge);

src/Spotify/Routes/auth/RefreshRoute.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/* eslint-disable camelcase */ import Route from '../../Private/BaseRoute';
1+
/* eslint-disable camelcase */
2+
import Route from '../../Private/BaseRoute';
23
import SpotifyManager from '../../SpotifyManager';
34
import { Request, Response } from 'express';
45

src/Spotify/SpotifyManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class SpotifyManager {
3434
this.token = null;
3535
this.interval = setInterval(async () => {
3636
if (this.token) {
37-
const res = await fetch(`http://localhost:${this.Application.config.port}/auth/refresh`);
37+
const res = await fetch(`http://127.0.0.1:${this.Application.config.port}/auth/refresh`);
3838
if (200 !== res.status) {
3939
this.Application.Logger.warn('Token refresh failed.');
4040
return;
@@ -55,7 +55,7 @@ class SpotifyManager {
5555
this.expressServer.get(route.path, route.handle.bind(route));
5656
}
5757
this.expressServer.listen(this.Application.config.port, () => {
58-
this.Application.Logger.other(`Proxy server listening at http://localhost:${this.Application.config.port}`);
58+
this.Application.Logger.other(`Proxy server listening at http://127.0.0.1:${this.Application.config.port}`);
5959
});
6060
}
6161
}

0 commit comments

Comments
 (0)