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
23
packages/roleypoly-server/rpc/rpc_test.js
Normal file
23
packages/roleypoly-server/rpc/rpc_test.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
// @flow
|
||||
import { type AppContext } from '../Roleypoly'
|
||||
import { type Context } from 'koa'
|
||||
import * as secureAs from './_security'
|
||||
export default ($: AppContext) => ({
|
||||
// i want RPC to be *dead* simple.
|
||||
// probably too simple.
|
||||
hello (_: Context, hello: string) {
|
||||
return `hello, ${hello} and all who inhabit it`
|
||||
},
|
||||
|
||||
testJSON (_: Context, inobj: {}) {
|
||||
return inobj
|
||||
},
|
||||
|
||||
testDecide: secureAs.decide($,
|
||||
[ secureAs.root, () => { return 'root' } ],
|
||||
[ secureAs.manager, () => { return 'manager' } ],
|
||||
[ secureAs.member, () => { return 'member' } ],
|
||||
[ secureAs.authed, () => { return 'authed' } ],
|
||||
[ secureAs.any, () => { return 'guest' } ]
|
||||
)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue