v1/UI/config/rpc.js
2019-03-10 15:24:05 -05:00

13 lines
279 B
JavaScript

// @flow
import RPCClient from '../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
}
}