Quellcode durchsuchen

Removing automatic lookup of admin settings

Kirk Trombley vor 6 Jahren
Ursprung
Commit
1f0b659df8
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 1
      src/app.py
  2. 0 2
      src/config.py

+ 4 - 1
src/app.py

@@ -5,11 +5,14 @@ from threading import Thread
 from flask import Flask, request, render_template, jsonify
 
 import db
-from config import BOTS_LOOKUP, GLOBAL_ADMINS, GROUP_ADMINS, get_config
+from config import BOTS_LOOKUP, get_config, get_secret
 from command_system import RollbotMessage, RollbotResponse, RollbotFailure
 from rollbot import Rollbot
 from util import post_message
 
+GLOBAL_ADMINS = get_secret("auths.global")
+GROUP_ADMINS = get_secret("auths.group")
+
 dictConfig({
     "version": 1,
     "formatters": {"default": {

+ 0 - 2
src/config.py

@@ -27,7 +27,5 @@ def get_secret(key):
 
 
 BOTS_LOOKUP = get_secret("bots")
-GLOBAL_ADMINS = get_secret("auths.global")
-GROUP_ADMINS = get_secret("auths.group")
 API_KEY = get_secret("api_key")
 DB_FILE = os.path.abspath(get_config("database"))