From 831597f015331c5e7c685f841c120441fd3b4b77 Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Fri, 17 Feb 2023 22:52:54 +0100 Subject: [PATCH] share: object id --- router/album.js | 2 +- router/box.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/router/album.js b/router/album.js index a4434be..4d97485 100644 --- a/router/album.js +++ b/router/album.js @@ -126,7 +126,7 @@ router.route("/:id/share") if (result == null) { let item = { user_id: req.user._id, - object_id: album._id, + object_id: new ObjectId(album_id), title: album.title, type: "album", cover: album.covers.cover32 diff --git a/router/box.js b/router/box.js index 947fdf7..2aec8c7 100644 --- a/router/box.js +++ b/router/box.js @@ -128,7 +128,7 @@ router.route("/:id/share") if (result == null) { let item = { user_id: req.user._id, - object_id: box._id, + object_id: new ObjectId(box_id), title: box.title, type: "box", cover: box.covers.cover32