From 71d5955654f4cc0bf043eb0d0c94492237b8bcbe Mon Sep 17 00:00:00 2001 From: Aleksandra Sikora Date: Thu, 25 Feb 2021 18:30:34 +0100 Subject: [PATCH] console: move back to metadata apis for verifying login GitOrigin-RevId: 56581f7f05f8c69d8b2d38c3719057b489132437 --- console/src/components/Login/Actions.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/console/src/components/Login/Actions.ts b/console/src/components/Login/Actions.ts index e4018f22376..e9f2066423e 100644 --- a/console/src/components/Login/Actions.ts +++ b/console/src/components/Login/Actions.ts @@ -5,6 +5,7 @@ import { ADMIN_SECRET_HEADER_KEY, CLI_CONSOLE_MODE } from '../../constants'; import requestAction from '../../utils/requestAction'; import { Dispatch } from '../../types'; import globals from '../../Globals'; +import { inconsistentObjectsQuery } from '../../metadata/queryUtils'; type VerifyLoginOptions = { adminSecret: string; @@ -22,14 +23,15 @@ export const verifyLogin = ({ dispatch, }: VerifyLoginOptions) => { const options: RequestInit = { - method: 'GET', + method: 'POST', credentials: globalCookiePolicy, headers: { [ADMIN_SECRET_HEADER_KEY]: adminSecret, 'content-type': 'application/json', }, + body: JSON.stringify(inconsistentObjectsQuery), }; - return dispatch(requestAction(Endpoints.serverConfig, options)).then( + return dispatch(requestAction(Endpoints.metadata, options)).then( () => { if (adminSecret) { if (globals.consoleMode !== CLI_CONSOLE_MODE) {