This commit is contained in:
Flummi 2017-11-26 00:26:39 +01:00
parent c5f2a6c5d3
commit aaca4e161d

View File

@ -1,7 +1,8 @@
import sql from "./sql.js"; import sql from "./sql.js";
export let admins = []; export let admins = [];
export const loadAdmins = (() => { export const loadAdmins = () => {
admins = [];
sql.exec("select * from `admins`") sql.exec("select * from `admins`")
.then(rows => { .then(rows => {
rows.forEach(row => { rows.forEach(row => {
@ -17,7 +18,8 @@ export const loadAdmins = (() => {
.catch(err => { .catch(err => {
console.log("keine Admins vorhanden"); console.log("keine Admins vorhanden");
}); });
})(); };
loadAdmins();
export const getLevel = (network, user) => { export const getLevel = (network, user) => {
let ret = { let ret = {