adding that deletion of album removes its items

This commit is contained in:
Marek Maslowski
2026-04-04 19:52:49 +02:00
parent 21063e6230
commit 2baf407809
5 changed files with 21 additions and 15 deletions
+2 -1
View File
@@ -136,7 +136,8 @@ router.get('/albums', authenticate, async (req: Request, res: Response) => {
router.post('/trips/:tripId/album-links/:linkId/sync', authenticate, async (req: Request, res: Response) => {
const authReq = req as AuthRequest;
const { tripId, linkId } = req.params;
const result = await syncAlbumAssets(tripId, linkId, authReq.user.id);
const sid = req.headers['x-socket-id'] as string;
const result = await syncAlbumAssets(tripId, linkId, authReq.user.id, sid);
if (result.error) return res.status(result.status!).json({ error: result.error });
res.json({ success: true, added: result.added, total: result.total });
if (result.added! > 0) {
+2 -1
View File
@@ -72,8 +72,9 @@ router.get('/albums', authenticate, async (req: Request, res: Response) => {
router.post('/trips/:tripId/album-links/:linkId/sync', authenticate, async (req: Request, res: Response) => {
const authReq = req as AuthRequest;
const { tripId, linkId } = req.params;
const sid = req.headers['x-socket-id'] as string;
handleServiceResult(res, await syncSynologyAlbumLink(authReq.user.id, tripId, linkId));
handleServiceResult(res, await syncSynologyAlbumLink(authReq.user.id, tripId, sid, linkId));
});
router.post('/search', authenticate, async (req: Request, res: Response) => {