From 54067b76f11c745436d67fe6d1ac42bb0c117769 Mon Sep 17 00:00:00 2001 From: Dmitry Dergunov Date: Sun, 17 Jan 2021 02:52:30 +0300 Subject: [PATCH] #10 fix fatal error: --- README.md | 2 +- src/modules/api/spotify/api.service.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 870301b..14fc589 100644 --- a/README.md +++ b/README.md @@ -33,5 +33,5 @@ npm start ```bash sudo docker rm --force musiq sudo docker pull docker.pkg.github.com/music10/server/server:latest -sudo docker run -p 5001:3001 -p 5000:3000 -d --name musiq docker.pkg.github.com/music10/server/server:latest +sudo docker run -p 5001:3001 -p 5000:3000 -d --name musiq --restart always docker.pkg.github.com/music10/server/server:latest ``` diff --git a/src/modules/api/spotify/api.service.ts b/src/modules/api/spotify/api.service.ts index a4b9d08..42faf46 100644 --- a/src/modules/api/spotify/api.service.ts +++ b/src/modules/api/spotify/api.service.ts @@ -30,7 +30,6 @@ export class ApiService implements MusicApi { this.httpService.axiosRef.interceptors.response.use( (value) => value, async (error) => { - console.log(error); if ( error.response?.data?.error?.message === 'The access token expired' ) { @@ -123,7 +122,7 @@ export class ApiService implements MusicApi { const responseHandler = ({ data }) => { tracks.push( ...data.items - .filter(({ track }) => track.preview_url) + .filter(({ track }) => track?.preview_url) .map(({ track }) => ({ name: track.name, id: track.id,