mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 10:19:10 +00:00
RPC: temporarily disable argument guards, add cookie support for SSR
(now with full isomorphism... almost!)
This commit is contained in:
parent
f30ca78e40
commit
c32ee37ca5
5 changed files with 47 additions and 10 deletions
11
rpc/user.js
Normal file
11
rpc/user.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
// @flow
|
||||
import { type AppContext } from '../Roleypoly'
|
||||
import { type Context } from 'koa'
|
||||
// import { type Guild } from 'discord.js'
|
||||
|
||||
export default ($: AppContext) => ({
|
||||
getCurrentUser (ctx: Context) {
|
||||
const { userId } = ctx.session
|
||||
return $.discord.getUserPartial(ctx.session.userId)
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue