diff --git a/mastodon_multi_accounts.db b/mastodon_multi_accounts.db index baec03b..ed32c16 100644 Binary files a/mastodon_multi_accounts.db and b/mastodon_multi_accounts.db differ diff --git a/routes/index.js b/routes/index.js index 84db5b9..c0c2a69 100644 --- a/routes/index.js +++ b/routes/index.js @@ -88,24 +88,27 @@ router.get('/list', function (req, res, next) { }); -router.get('/add-to-db-example', function (req, res, next) { - let db = connect(database_masto); +router.get('/add-example', function (req, res, next) { + // let db = connect(database_masto); async function prepare() { await db.query(sql` insert into posts_scheduled - values (NULL, "modominem", "un message d'example", "un jour") + values (NULL, "modominem", "un message d'example", "image.jpg",NULL) ; `).then(resp => { console.log(resp) let posts_list = [] - res.render('database', {posts_list: posts_list}); + res.redirect('/list') }, err => { console.log(err) }); } + + const prepared = prepare(); + } ); diff --git a/views/layout.jade b/views/layout.jade index 0c6cdbd..5995b3e 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -10,6 +10,6 @@ html a(href="/") ajouter a(href="/init-db") init DB a(href="/list") list DB - a(href="/add-to-db-example") ajout à la file example + a(href="/add-example") ajout à la file example block content