feat: Add ctx.state.authType for tracking (#1567)

This commit is contained in:
Tom Moor
2020-09-21 22:02:37 -07:00
committed by GitHub
parent fa96891c8e
commit 0fa8a6ed2e
3 changed files with 39 additions and 25 deletions

12
server/types.js Normal file
View File

@@ -0,0 +1,12 @@
// @flow
import { type Context } from "koa";
import { User } from "./models";
export type ContextWithState = {|
...$Exact<Context>,
state: {
user: User,
token: string,
authType: "app" | "api",
},
|};