mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
v2: init -- UI is nuked from orbit, major app restructuring
This commit is contained in:
parent
c6f5b55c1c
commit
b8da886601
108 changed files with 6717 additions and 17430 deletions
17
api/ui.js
Normal file
17
api/ui.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
// note, this file only contains stuff for complicated routes.
|
||||
// next.js will handle anything beyond this.
|
||||
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})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
processMappings({
|
||||
"/s/add": "/_server_add",
|
||||
"/s/:id": "/_server",
|
||||
"/help/:page": "/_help"
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue