From 98e1aef9d8185ac0b06ecdaab070c9693d48c988 Mon Sep 17 00:00:00 2001 From: myk bilokonsky Date: Mon, 10 Apr 2017 03:22:51 +0200 Subject: cleanup --- index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 0c2039c..b53ef73 100644 --- a/index.js +++ b/index.js @@ -44,14 +44,12 @@ function cycle() { }); }); } -var api_url = process.env.INSTANCE_HOST + '/api/v1'; -console.log('Now initializing mastodon API with token', process.env.AMBASSADOR_TOKEN, 'and api url', api_url); + var M = new mastodon({ access_token: process.env.AMBASSADOR_TOKEN, - api_url: api_url + api_url: process.env.INSTANCE_HOST }); - var boosted = {}; function boost(rows) { rows.map(function(row) { @@ -68,7 +66,7 @@ function boost(rows) { return console.log('Warning: tried to boost #' + id + ' but it had already been boosted by this account. Adding to cache.'); } - return console.error(err); + return console.log(err); } boosted[id] = true; console.log('boosted status #' + id); -- cgit