2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-29 05:07:49 +00:00

fixed staff admins links

This commit is contained in:
Pouria Ezzati 2017-09-27 00:12:21 +03:30
parent 1219654065
commit 40720d8ff9

View File

@ -9,15 +9,7 @@ const { getAdmins } = require('../../stores/user');
const staffHandler = async ctx => {
const admins = await getAdmins();
const links = admins
// this first .map wouldn't have to be here
// if we stored whole user as-is
// ie. if id was available as id, not user_id
.map(admin => ({
first_name: admin.first_name,
id: admin.user_id,
}))
.map(link);
const links = admins.map(link);
const list = links.map(s => `${s}`).join('\n');