mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
fix: remove debug logging
This commit is contained in:
parent
aecc82576a
commit
f56218602e
6 changed files with 0 additions and 25 deletions
|
|
@ -73,7 +73,6 @@ export const getRecentListens = async (
|
||||||
}
|
}
|
||||||
|
|
||||||
const listens: Pagination<Listen> = await res.json();
|
const listens: Pagination<Listen> = await res.json();
|
||||||
console.log("getRecentListens", { listens });
|
|
||||||
return listens;
|
return listens;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ function useProvideAuth(): AuthContext {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
console.log("before calling getUsersMe");
|
|
||||||
const currentUser = await getUsersMe();
|
const currentUser = await getUsersMe();
|
||||||
setUser(currentUser);
|
setUser(currentUser);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
|
|
@ -61,12 +61,6 @@ export class AuthService {
|
||||||
|
|
||||||
const whitelistedIDs = this.userFilter.split(",");
|
const whitelistedIDs = this.userFilter.split(",");
|
||||||
|
|
||||||
console.log("whitelisted ids", {
|
|
||||||
whitelistedIDs,
|
|
||||||
uf: this.userFilter,
|
|
||||||
spotifyID,
|
|
||||||
});
|
|
||||||
|
|
||||||
return whitelistedIDs.includes(spotifyID);
|
return whitelistedIDs.includes(spotifyID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ export class MusicLibraryService {
|
||||||
artist.name = data.name;
|
artist.name = data.name;
|
||||||
artist.spotify = data.spotify;
|
artist.spotify = data.spotify;
|
||||||
|
|
||||||
console.log("createArtist", { data, artist });
|
|
||||||
|
|
||||||
await this.artistRepository.save(artist);
|
await this.artistRepository.save(artist);
|
||||||
|
|
||||||
return artist;
|
return artist;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ export class SpotifyApiService {
|
||||||
accessToken,
|
accessToken,
|
||||||
lastRefreshTime,
|
lastRefreshTime,
|
||||||
}: SpotifyConnection): Promise<PlayHistoryObject[]> {
|
}: SpotifyConnection): Promise<PlayHistoryObject[]> {
|
||||||
console.log("SpotifyApiService#getRecentlyPlayedTracks");
|
|
||||||
|
|
||||||
const parameters: { limit: number; after?: number } = {
|
const parameters: { limit: number; after?: number } = {
|
||||||
limit: 50,
|
limit: 50,
|
||||||
};
|
};
|
||||||
|
|
@ -24,12 +22,6 @@ export class SpotifyApiService {
|
||||||
parameters.after = lastRefreshTime.getTime();
|
parameters.after = lastRefreshTime.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
|
||||||
"getRecentlyPlayedTracks parameters",
|
|
||||||
parameters,
|
|
||||||
lastRefreshTime
|
|
||||||
);
|
|
||||||
|
|
||||||
const history = await this.httpService
|
const history = await this.httpService
|
||||||
.get<PagingObject<PlayHistoryObject>>(`v1/me/player/recently-played`, {
|
.get<PagingObject<PlayHistoryObject>>(`v1/me/player/recently-played`, {
|
||||||
headers: { Authorization: `Bearer ${accessToken}` },
|
headers: { Authorization: `Bearer ${accessToken}` },
|
||||||
|
|
@ -44,7 +36,6 @@ export class SpotifyApiService {
|
||||||
accessToken: string,
|
accessToken: string,
|
||||||
spotifyID: string
|
spotifyID: string
|
||||||
): Promise<ArtistObject> {
|
): Promise<ArtistObject> {
|
||||||
console.log("SpotifyApiService#getArtist");
|
|
||||||
const artist = await this.httpService
|
const artist = await this.httpService
|
||||||
.get<ArtistObject>(`v1/artists/${spotifyID}`, {
|
.get<ArtistObject>(`v1/artists/${spotifyID}`, {
|
||||||
headers: { Authorization: `Bearer ${accessToken}` },
|
headers: { Authorization: `Bearer ${accessToken}` },
|
||||||
|
|
@ -55,21 +46,16 @@ export class SpotifyApiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAlbum(accessToken: string, spotifyID: string): Promise<AlbumObject> {
|
async getAlbum(accessToken: string, spotifyID: string): Promise<AlbumObject> {
|
||||||
console.log("SpotifyApiService#getAlbum");
|
|
||||||
|
|
||||||
const album = await this.httpService
|
const album = await this.httpService
|
||||||
.get<AlbumObject>(`v1/albums/${spotifyID}`, {
|
.get<AlbumObject>(`v1/albums/${spotifyID}`, {
|
||||||
headers: { Authorization: `Bearer ${accessToken}` },
|
headers: { Authorization: `Bearer ${accessToken}` },
|
||||||
})
|
})
|
||||||
.toPromise();
|
.toPromise();
|
||||||
|
|
||||||
console.log("getAlbum", { data: album.data });
|
|
||||||
return album.data;
|
return album.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTrack(accessToken: string, spotifyID: string): Promise<TrackObject> {
|
async getTrack(accessToken: string, spotifyID: string): Promise<TrackObject> {
|
||||||
console.log("SpotifyApiService#getTrack");
|
|
||||||
|
|
||||||
const track = await this.httpService
|
const track = await this.httpService
|
||||||
.get<TrackObject>(`v1/tracks/${spotifyID}`, {
|
.get<TrackObject>(`v1/tracks/${spotifyID}`, {
|
||||||
headers: { Authorization: `Bearer ${accessToken}` },
|
headers: { Authorization: `Bearer ${accessToken}` },
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ export class SpotifyService {
|
||||||
|
|
||||||
@Interval(20 * 1000)
|
@Interval(20 * 1000)
|
||||||
async getRecentlyPlayedTracks(): Promise<void> {
|
async getRecentlyPlayedTracks(): Promise<void> {
|
||||||
console.log("SpotifyService#getRecentlyPlayedTracks");
|
|
||||||
const users = await this.usersService.findAll();
|
const users = await this.usersService.findAll();
|
||||||
|
|
||||||
for (const user of users) {
|
for (const user of users) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue