mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 02:29:10 +00:00
[ui-server]: working test of UI server
This commit is contained in:
parent
74e87ccbc7
commit
88959c59fe
6 changed files with 100 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
linters:
|
||||
./**/*.{js,jsx}:
|
||||
- standard --fix
|
||||
- git add
|
||||
./**/*.{ts,tsx}:
|
||||
- tslint --fix
|
||||
- stylelint --fix
|
||||
|
|
21
packages/roleypoly-ui/mappings.js
Normal file
21
packages/roleypoly-ui/mappings.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
module.exports = {
|
||||
'/s/add': {
|
||||
path: '/_internal/_server_add',
|
||||
custom (router) {
|
||||
router.get('/s/', ctx => ctx.redirect('/s/add'))
|
||||
}
|
||||
},
|
||||
'/s/:id': {
|
||||
path: '/_internal/_server',
|
||||
noAutoFix: true,
|
||||
custom (router) {
|
||||
router.get('/_internal/_server', ctx => {
|
||||
if (ctx.query.id) {
|
||||
return ctx.redirect(`/s/${ctx.query.id}`)
|
||||
}
|
||||
|
||||
return ctx.redirect('/s/add')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue