master
adb-sh 2 years ago
parent a48d6a8fc0
commit 6557c2991d

@ -16,9 +16,8 @@ export const applyUserRoutes = (router) => {
res.send({ currentlyPlaying }); res.send({ currentlyPlaying });
}); });
router.get('/me/role', (req, res) => { router.get('/me', async (req, res) => {
res.status(200); const user = await getUserResource(res.locals.user);
res.send({ role: res.locals.user?.role });
}); });
}; };

@ -6,6 +6,7 @@ export const syncAllSessions = async () => {
}; };
export const syncSession = async sessionStore => { export const syncSession = async sessionStore => {
if (sessionStore.clients.length === 0) return;
const hostStore = await UserStore.findById(sessionStore.host._id); const hostStore = await UserStore.findById(sessionStore.host._id);
const host = await hostStore.spotify.local; const host = await hostStore.spotify.local;
const hostCP = await host.player.getCurrentlyPlaying("track"); const hostCP = await host.player.getCurrentlyPlaying("track");

@ -1 +1 @@
Subproject commit 16509550450f792ed3c7b45385a57a0270a78d6c Subproject commit e5f9f825cb0ef1fc4451867aac75257c820b1bda
Loading…
Cancel
Save