mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
console: migrate login actions to typescript (#5499)
This commit is contained in:
parent
8c5da552ac
commit
1b96d800c5
@ -3,17 +3,26 @@ import { UPDATE_DATA_HEADERS } from '../Services/Data/DataActions';
|
||||
import { saveAdminSecretState } from '../AppState';
|
||||
import { ADMIN_SECRET_HEADER_KEY, CLI_CONSOLE_MODE } from '../../constants';
|
||||
import requestAction from '../../utils/requestAction';
|
||||
import { Dispatch } from '../../types';
|
||||
import globals from '../../Globals';
|
||||
|
||||
type VerifyLoginOptions = {
|
||||
adminSecret: string;
|
||||
shouldPersist: boolean;
|
||||
successCallback: () => void;
|
||||
errorCallback: (err: Error) => void;
|
||||
dispatch: Dispatch;
|
||||
};
|
||||
|
||||
export const verifyLogin = ({
|
||||
adminSecret,
|
||||
shouldPersist,
|
||||
successCallback,
|
||||
errorCallback,
|
||||
dispatch,
|
||||
}) => {
|
||||
}: VerifyLoginOptions) => {
|
||||
const url = Endpoints.getSchema;
|
||||
const requestOptions = {
|
||||
const requestOptions: RequestInit = {
|
||||
credentials: globalCookiePolicy,
|
||||
method: 'POST',
|
||||
headers: {
|
Loading…
Reference in New Issue
Block a user