Info lors d'un ajout d'album déjà en collection

This commit is contained in:
Damien Broqua 2023-09-24 14:53:04 +02:00
parent 205474a701
commit 81c61a0529
5 changed files with 43 additions and 2 deletions

View file

@ -167,6 +167,7 @@ Publié automatiquement via #musictopus`;
genre,
style,
userId: collectionUserId,
discogsIds,
} = this.req.query;
let userId = this.req.user?._id;
@ -216,6 +217,10 @@ Publié automatiquement via #musictopus`;
userId = userIsSharingCollection._id;
}
if (discogsIds) {
where.discogsId = { $in: discogsIds };
}
const count = await AlbumsModel.count({
User: userId,
...where,