mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 10:39:09 +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
|
@ -1,4 +1,13 @@
|
|||
// @flow
|
||||
import RPCClient from '../rpc'
|
||||
|
||||
export default (new RPCClient({ forceDev: false })).rpc
|
||||
const client = new RPCClient({ forceDev: false })
|
||||
|
||||
export default client.rpc
|
||||
export const withCookies = (ctx: any) => {
|
||||
if (ctx.req != null) {
|
||||
return client.withCookies(ctx.req.headers.cookie)
|
||||
} else {
|
||||
return client.rpc
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue