Commentaires fédérés via Mastodon (bokante.o-k-i.net) — backend #5

Merged
cedric merged 8 commits from feat/comment-fedi into master 2026-07-04 21:24:31 +00:00
Showing only changes of commit 861e75fde2 - Show all commits
+18
View File
@@ -1,5 +1,6 @@
const path = require('path');
const {backupDatabase} = require('../src/utils/backup-database');
const {importBokanteComments} = require('../src/utils/import-bokante-comments');
module.exports = {
myJob: {
@@ -19,4 +20,21 @@ module.exports = {
tz: 'Indian/Reunion',
},
},
importBokanteComments: {
task: async ({ strapi }) => {
if (!process.env.BOKANTE_ACCESS_TOKEN) {
return;
}
const {imported} = await importBokanteComments({strapi});
if (imported > 0) {
strapi.log.info(`Import bokante : ${imported} commentaire(s) importé(s).`);
}
},
options: {
rule: '*/20 * * * *',
tz: 'Indian/Reunion',
},
},
};