mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 10:39:09 +00:00
lerna: split up bulk of packages
This commit is contained in:
parent
cb0b1d2410
commit
47a2e5694e
90 changed files with 0 additions and 0 deletions
28
packages/roleypoly-server/api/servers_test.js
Normal file
28
packages/roleypoly-server/api/servers_test.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
// @flow
|
||||
import { type Context } from 'koa'
|
||||
import { type AppContext, type Router } from '../Roleypoly'
|
||||
export default (R: Router, $: AppContext) => {
|
||||
R.get('/api/~/relevant-servers/:user', async (ctx: Context, next: () => void) => {
|
||||
// ctx.body = 'ok'
|
||||
const srv = $.discord.getRelevantServers(ctx.params.user)
|
||||
ctx.body = $.P.presentableServers(srv, ctx.params.user)
|
||||
})
|
||||
|
||||
// R.get('/api/~/roles/:id/:userId', (ctx, next) => {
|
||||
// // ctx.body = 'ok'
|
||||
// const { id, userId } = ctx.params
|
||||
|
||||
// const srv = $.discord.client.guilds.get(id)
|
||||
|
||||
// if (srv === undefined) {
|
||||
// ctx.body = { err: 'not found' }
|
||||
// ctx.status = 404
|
||||
// return
|
||||
// }
|
||||
|
||||
// const gm = srv.members.get(userId)
|
||||
// const roles = $.P.presentableRoles(id, gm)
|
||||
|
||||
// ctx.boy = roles
|
||||
// })
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue