diff --git a/backend/api/user.mjs b/backend/api/user.mjs index 3089d20..3bffda3 100644 --- a/backend/api/user.mjs +++ b/backend/api/user.mjs @@ -16,9 +16,8 @@ export const applyUserRoutes = (router) => { res.send({ currentlyPlaying }); }); - router.get('/me/role', (req, res) => { - res.status(200); - res.send({ role: res.locals.user?.role }); + router.get('/me', async (req, res) => { + const user = await getUserResource(res.locals.user); }); }; diff --git a/backend/syncSessions.mjs b/backend/syncSessions.mjs index 6d512b2..54c8d60 100644 --- a/backend/syncSessions.mjs +++ b/backend/syncSessions.mjs @@ -6,6 +6,7 @@ export const syncAllSessions = async () => { }; export const syncSession = async sessionStore => { + if (sessionStore.clients.length === 0) return; const hostStore = await UserStore.findById(sessionStore.host._id); const host = await hostStore.spotify.local; const hostCP = await host.player.getCurrentlyPlaying("track"); diff --git a/frontend b/frontend index 1650955..e5f9f82 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 16509550450f792ed3c7b45385a57a0270a78d6c +Subproject commit e5f9f825cb0ef1fc4451867aac75257c820b1bda