mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 02:19:08 +00:00
styling: standard.js enforcement.
This commit is contained in:
parent
b8da886601
commit
11cf1d4805
9 changed files with 17 additions and 19 deletions
|
@ -72,7 +72,6 @@ module.exports = (R, $) => {
|
|||
ctx.redirect(url)
|
||||
})
|
||||
|
||||
|
||||
R.get('/api/oauth/bot/callback', ctx => {
|
||||
console.log(ctx.request)
|
||||
})
|
||||
|
|
|
@ -39,7 +39,7 @@ module.exports = (R, $) => {
|
|||
})
|
||||
|
||||
R.get('/api/server/:id/slug', async (ctx) => {
|
||||
const { userId } = ctx.session
|
||||
// const { userId } = ctx.session
|
||||
const { id } = ctx.params
|
||||
|
||||
const srv = $.discord.client.guilds.get(id)
|
||||
|
|
|
@ -3,7 +3,6 @@ module.exports = (R, $) => {
|
|||
// ctx.body = 'ok'
|
||||
const srv = $.discord.getRelevantServers(ctx.params.user)
|
||||
ctx.body = $.discord.presentableServers(srv, ctx.params.user)
|
||||
return
|
||||
})
|
||||
|
||||
R.get('/api/~/roles/:id/:userId', (ctx, next) => {
|
||||
|
|
|
@ -4,14 +4,14 @@ module.exports = (R, $) => {
|
|||
const processMappings = mapping => {
|
||||
for (let p in mapping) {
|
||||
R.get(p, ctx => {
|
||||
$.ui.render(ctx.req, ctx.res, mapping[p], {...ctx.params, ...ctx.query})
|
||||
return $.ui.render(ctx.req, ctx.res, mapping[p], { ...ctx.query, ...ctx.params })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
processMappings({
|
||||
"/s/add": "/_server_add",
|
||||
"/s/:id": "/_server",
|
||||
"/help/:page": "/_help"
|
||||
'/s/add': '/_internal/_server_add',
|
||||
'/s/:id': '/_internal/_server',
|
||||
'/test': '/test'
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue