From 7e97bbad3393e876690c9f628460d8d1283b9c10 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Sat, 15 Jan 2022 21:43:00 +0100 Subject: [PATCH] Change .spotify to spotify.json --- .gitignore | 2 +- Dockerfile | 2 +- app/Utils/SongUtils.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index cb4d2cb..496e1e8 100755 --- a/.gitignore +++ b/.gitignore @@ -110,4 +110,4 @@ dist database/seeders build -.spotify +spotify.json diff --git a/Dockerfile b/Dockerfile index c9d605f..d83dde7 100755 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /usr/src/athena/build RUN yarn install --production -RUN touch .spotify +RUN touch spotify.json EXPOSE 5555 diff --git a/app/Utils/SongUtils.ts b/app/Utils/SongUtils.ts index 26b98a7..44d2842 100644 --- a/app/Utils/SongUtils.ts +++ b/app/Utils/SongUtils.ts @@ -7,7 +7,7 @@ import { Artist, InternalPlayerResponse, PlayerResponse, SpotifyToken } from 'Ap import Song from 'App/Models/Song' export function getSpotifyAccount(): { access: string; refresh: string } { - return JSON.parse(readFileSync('.spotify').toString()) + return JSON.parse(readFileSync('spotify.json').toString()) } export function getAuthorizationURI(): string { @@ -39,7 +39,7 @@ export async function setupSpotify(code: string): Promise { if (authorization_tokens.status === 200) { writeFileSync( - '.spotify', + 'spotify.json', JSON.stringify({ access: authorization_tokens.data.access_token, refresh: authorization_tokens.data.refresh_token, @@ -67,7 +67,7 @@ export async function regenerateTokens(): Promise { if (authorization_tokens.status === 200) { writeFileSync( - '.spotify', + 'spotify.json', JSON.stringify({ access: authorization_tokens.data.access_token, refresh: authorization_tokens.data.refresh_token,