mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Clear debug
This commit is contained in:
@@ -6,7 +6,6 @@ import { Artist, InternalPlayerResponse, PlayerResponse, SpotifyToken } from 'Ap
|
||||
import Song from 'App/Models/Song'
|
||||
import queryString from 'query-string'
|
||||
import { updateGithubReadmeSpotify } from 'App/Utils/UpdateGithubReadme'
|
||||
import { diff } from 'deep-object-diff'
|
||||
|
||||
export async function getSpotifyAccount(): Promise<SpotifyToken> {
|
||||
return await Redis.exists('spotify:account')
|
||||
@@ -139,12 +138,12 @@ export async function resetCurrentSongCache(): Promise<void> {
|
||||
}
|
||||
|
||||
export async function updateCurrentSong(song: InternalPlayerResponse): Promise<void> {
|
||||
const current = JSON.parse(await Redis.get('spotify/current') as string)
|
||||
// const current = JSON.parse(await Redis.get('spotify/current') as string)
|
||||
await Redis.set('spotify:current', JSON.stringify(song))
|
||||
await updateGithubReadmeSpotify()
|
||||
|
||||
const changed = diff(current, song)
|
||||
console.log(changed)
|
||||
// const changed = diff(current, song)
|
||||
// console.log(changed)
|
||||
// todo send message to Rabbit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user