From f56218602e9a56221867f4357901e58e37720579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Sat, 11 Jul 2020 19:48:18 +0200 Subject: [PATCH] fix: remove debug logging --- frontend/src/api/api.ts | 1 - frontend/src/hooks/use-auth.tsx | 1 - src/auth/auth.service.ts | 6 ------ src/music-library/music-library.service.ts | 2 -- .../spotify/spotify-api/spotify-api.service.ts | 14 -------------- src/sources/spotify/spotify.service.ts | 1 - 6 files changed, 25 deletions(-) diff --git a/frontend/src/api/api.ts b/frontend/src/api/api.ts index 1952023..63339f1 100644 --- a/frontend/src/api/api.ts +++ b/frontend/src/api/api.ts @@ -73,7 +73,6 @@ export const getRecentListens = async ( } const listens: Pagination = await res.json(); - console.log("getRecentListens", { listens }); return listens; }; diff --git a/frontend/src/hooks/use-auth.tsx b/frontend/src/hooks/use-auth.tsx index 8499c37..ad4679f 100644 --- a/frontend/src/hooks/use-auth.tsx +++ b/frontend/src/hooks/use-auth.tsx @@ -34,7 +34,6 @@ function useProvideAuth(): AuthContext { useEffect(() => { (async () => { try { - console.log("before calling getUsersMe"); const currentUser = await getUsersMe(); setUser(currentUser); } catch (err) { diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 79c10af..d1c2b96 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -61,12 +61,6 @@ export class AuthService { const whitelistedIDs = this.userFilter.split(","); - console.log("whitelisted ids", { - whitelistedIDs, - uf: this.userFilter, - spotifyID, - }); - return whitelistedIDs.includes(spotifyID); } } diff --git a/src/music-library/music-library.service.ts b/src/music-library/music-library.service.ts index 8879554..2e61496 100644 --- a/src/music-library/music-library.service.ts +++ b/src/music-library/music-library.service.ts @@ -32,8 +32,6 @@ export class MusicLibraryService { artist.name = data.name; artist.spotify = data.spotify; - console.log("createArtist", { data, artist }); - await this.artistRepository.save(artist); return artist; diff --git a/src/sources/spotify/spotify-api/spotify-api.service.ts b/src/sources/spotify/spotify-api/spotify-api.service.ts index f4369e7..ee85666 100644 --- a/src/sources/spotify/spotify-api/spotify-api.service.ts +++ b/src/sources/spotify/spotify-api/spotify-api.service.ts @@ -14,8 +14,6 @@ export class SpotifyApiService { accessToken, lastRefreshTime, }: SpotifyConnection): Promise { - console.log("SpotifyApiService#getRecentlyPlayedTracks"); - const parameters: { limit: number; after?: number } = { limit: 50, }; @@ -24,12 +22,6 @@ export class SpotifyApiService { parameters.after = lastRefreshTime.getTime(); } - console.log( - "getRecentlyPlayedTracks parameters", - parameters, - lastRefreshTime - ); - const history = await this.httpService .get>(`v1/me/player/recently-played`, { headers: { Authorization: `Bearer ${accessToken}` }, @@ -44,7 +36,6 @@ export class SpotifyApiService { accessToken: string, spotifyID: string ): Promise { - console.log("SpotifyApiService#getArtist"); const artist = await this.httpService .get(`v1/artists/${spotifyID}`, { headers: { Authorization: `Bearer ${accessToken}` }, @@ -55,21 +46,16 @@ export class SpotifyApiService { } async getAlbum(accessToken: string, spotifyID: string): Promise { - console.log("SpotifyApiService#getAlbum"); - const album = await this.httpService .get(`v1/albums/${spotifyID}`, { headers: { Authorization: `Bearer ${accessToken}` }, }) .toPromise(); - console.log("getAlbum", { data: album.data }); return album.data; } async getTrack(accessToken: string, spotifyID: string): Promise { - console.log("SpotifyApiService#getTrack"); - const track = await this.httpService .get(`v1/tracks/${spotifyID}`, { headers: { Authorization: `Bearer ${accessToken}` }, diff --git a/src/sources/spotify/spotify.service.ts b/src/sources/spotify/spotify.service.ts index f8a9a59..25daf1b 100644 --- a/src/sources/spotify/spotify.service.ts +++ b/src/sources/spotify/spotify.service.ts @@ -29,7 +29,6 @@ export class SpotifyService { @Interval(20 * 1000) async getRecentlyPlayedTracks(): Promise { - console.log("SpotifyService#getRecentlyPlayedTracks"); const users = await this.usersService.findAll(); for (const user of users) {