console: migrate login actions to typescript (#5499)

This commit is contained in:
Lautaro Gruss 2020-08-12 03:20:43 -06:00 committed by GitHub
parent 8c5da552ac
commit 1b96d800c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: {