mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
absolutely massive typescript porting time
This commit is contained in:
parent
01f238f515
commit
30d08a630f
159 changed files with 2563 additions and 3861 deletions
|
@ -1,13 +0,0 @@
|
|||
// @flow
|
||||
import RPCClient from '@roleypoly/rpc-client'
|
||||
|
||||
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
|
||||
}
|
||||
}
|
23
packages/roleypoly-ui/config/rpc.ts
Normal file
23
packages/roleypoly-ui/config/rpc.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
// @flow
|
||||
// import RPCClient from '@roleypoly/rpc-client'
|
||||
|
||||
// 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
|
||||
// }
|
||||
// }
|
||||
const o = {
|
||||
getCurrentUser: async (..._: any) => null,
|
||||
getServerSlug: async (..._: any) => null,
|
||||
checkAuthChallenge: async (..._: any) => false
|
||||
}
|
||||
|
||||
export default o
|
||||
export function withCookies () {
|
||||
return o
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue