add server list connection to discord

This commit is contained in:
41666 2017-12-05 02:11:49 -06:00
parent 6840446cdf
commit 13cd3bd4a0
13 changed files with 138 additions and 34 deletions

View file

@ -0,0 +1,14 @@
module.exports = (R, $) => {
R.get('/api/~/relevant-servers/:user', (ctx, next) => {
// ctx.body = 'ok'
const srv = $.discord.getRelevantServers(ctx.params.user)
ctx.body = $.discord.presentableServers(srv, ctx.params.user)
return
})
R.get('/api/~/roles/:server', (ctx, next) => {
// ctx.body = 'ok'
ctx.body = $.discord.getRoles(ctx.params.server)
return
})
}