Possibilité de ne pas partager un album sur le fediverse

This commit is contained in:
Damien Broqua 2023-10-07 18:52:52 +02:00
parent 1931bd9eda
commit 3b3a4cf779
4 changed files with 33 additions and 4 deletions

View file

@ -25,8 +25,9 @@ class Albums extends Pages {
*/
static async postAddOne(req) {
const { body, user } = req;
const { album: albumDetails, share } = body;
const data = {
...body,
...albumDetails,
discogsId: body.id,
User: user._id,
};
@ -54,7 +55,7 @@ class Albums extends Pages {
const { publish, token, url, message } = mastodonConfig;
if (publish && url && token) {
if (share && publish && url && token) {
const M = new Mastodon({
access_token: token,
api_url: url,