Info lors d'un ajout d'album déjà en collection
This commit is contained in:
parent
205474a701
commit
81c61a0529
5 changed files with 43 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue