Skip to content

Commit

Permalink
fix: remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
apricote committed Jul 11, 2020
1 parent aecc825 commit f562186
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion frontend/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const getRecentListens = async (
}

const listens: Pagination<Listen> = await res.json();
console.log("getRecentListens", { listens });
return listens;
};

Expand Down
1 change: 0 additions & 1 deletion frontend/src/hooks/use-auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function useProvideAuth(): AuthContext {
useEffect(() => {
(async () => {
try {
console.log("before calling getUsersMe");
const currentUser = await getUsersMe();
setUser(currentUser);
} catch (err) {
Expand Down
6 changes: 0 additions & 6 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 0 additions & 2 deletions src/music-library/music-library.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 0 additions & 14 deletions src/sources/spotify/spotify-api/spotify-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export class SpotifyApiService {
accessToken,
lastRefreshTime,
}: SpotifyConnection): Promise<PlayHistoryObject[]> {
console.log("SpotifyApiService#getRecentlyPlayedTracks");

const parameters: { limit: number; after?: number } = {
limit: 50,
};
Expand All @@ -24,12 +22,6 @@ export class SpotifyApiService {
parameters.after = lastRefreshTime.getTime();
}

console.log(
"getRecentlyPlayedTracks parameters",
parameters,
lastRefreshTime
);

const history = await this.httpService
.get<PagingObject<PlayHistoryObject>>(`v1/me/player/recently-played`, {
headers: { Authorization: `Bearer ${accessToken}` },
Expand All @@ -44,7 +36,6 @@ export class SpotifyApiService {
accessToken: string,
spotifyID: string
): Promise<ArtistObject> {
console.log("SpotifyApiService#getArtist");
const artist = await this.httpService
.get<ArtistObject>(`v1/artists/${spotifyID}`, {
headers: { Authorization: `Bearer ${accessToken}` },
Expand All @@ -55,21 +46,16 @@ export class SpotifyApiService {
}

async getAlbum(accessToken: string, spotifyID: string): Promise<AlbumObject> {
console.log("SpotifyApiService#getAlbum");

const album = await this.httpService
.get<AlbumObject>(`v1/albums/${spotifyID}`, {
headers: { Authorization: `Bearer ${accessToken}` },
})
.toPromise();

console.log("getAlbum", { data: album.data });
return album.data;
}

async getTrack(accessToken: string, spotifyID: string): Promise<TrackObject> {
console.log("SpotifyApiService#getTrack");

const track = await this.httpService
.get<TrackObject>(`v1/tracks/${spotifyID}`, {
headers: { Authorization: `Bearer ${accessToken}` },
Expand Down
1 change: 0 additions & 1 deletion src/sources/spotify/spotify.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class SpotifyService {

@Interval(20 * 1000)
async getRecentlyPlayedTracks(): Promise<void> {
console.log("SpotifyService#getRecentlyPlayedTracks");
const users = await this.usersService.findAll();

for (const user of users) {
Expand Down

0 comments on commit f562186

Please sign in to comment.