From 11c8f80791af39c7af4f6b546379d59ca58c0555 Mon Sep 17 00:00:00 2001
From: Tagadda <36127788+Tagadda@users.noreply.github.com>
Date: Sat, 9 Jun 2018 13:47:35 +0200
Subject: [PATCH] move admins to config.json

---
 config.json.example | 3 ++-
 index.js            | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config.json.example b/config.json.example
index 1c2ed00..bdefa0d 100644
--- a/config.json.example
+++ b/config.json.example
@@ -1,4 +1,5 @@
 {
   "access_token": "",
-  "api_url": "https://botsin.space/api/v1/"
+  "api_url": "https://botsin.space/api/v1/",
+  "admins": ["admin_username"]
 }
\ No newline at end of file
diff --git a/index.js b/index.js
index a7af4c4..9676fc1 100644
--- a/index.js
+++ b/index.js
@@ -4,7 +4,7 @@ const fs = require('fs');
 const config = require('./config.json');
 
 // Hardcode admins since Mastodon API doesn't provide such thing...
-const admins = new Set(['tagadmin', 'Dhveszak', 'Incandescente']);
+const admins = new Set(config.admins);
 
 const client = new Bot(config, [{api_point: "public", events: ["update"]},
                                 {api_point: "user", events: ["notification"]}]);
-- 
GitLab