chore: harmonize authToken to accessToken (#2184)

This commit is contained in:
Kiwi
2019-02-08 23:40:20 +01:00
committed by GitHub
parent 7ec6780ee1
commit 710de07fa6
47 changed files with 172 additions and 160 deletions
@@ -2,10 +2,10 @@ import { Environment } from "relay-runtime";
import { TalkContext } from "talk-framework/lib/bootstrap";
import { createMutationContainer } from "talk-framework/lib/relay";
import { commit as setAuthToken } from "talk-framework/mutations/SetAuthTokenMutation";
import { commit as setAccessToken } from "talk-framework/mutations/SetAccessTokenMutation";
interface CompleteAccountInput {
authToken: string;
accessToken: string;
}
export type CompleteAccountMutation = (
input: CompleteAccountInput
@@ -16,7 +16,11 @@ export async function commit(
input: CompleteAccountInput,
context: TalkContext
) {
await setAuthToken(environment, { authToken: input.authToken }, context);
await setAccessToken(
environment,
{ accessToken: input.accessToken },
context
);
}
export const withCompleteAccountMutation = createMutationContainer(