Possibilité de ne pas partager un album sur le fediverse
This commit is contained in:
parent
1931bd9eda
commit
3b3a4cf779
4 changed files with 33 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue