From c28ddc438dc90d3e9636d6936182c02439d5a610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Fri, 6 Mar 2026 14:39:59 +0100 Subject: [PATCH] nicolium: cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/nicolium/src/actions/auth.ts | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/packages/nicolium/src/actions/auth.ts b/packages/nicolium/src/actions/auth.ts index 1af872aeb..294c3df60 100644 --- a/packages/nicolium/src/actions/auth.ts +++ b/packages/nicolium/src/actions/auth.ts @@ -7,7 +7,6 @@ * @see module:@/actions/security */ import { - credentialAccountSchema, PlApiClient, type Account, type CreateAccountParams, @@ -16,7 +15,6 @@ import { type Token, } from 'pl-api'; import { defineMessages } from 'react-intl'; -import * as v from 'valibot'; import { createAccount } from '@/actions/accounts'; import { createApp } from '@/actions/apps'; @@ -188,23 +186,9 @@ const verifyCredentials = return account; }) .catch((error) => { - if (error?.response?.status === 403 && error?.response?.json?.id) { - // The user is waitlisted - const account = error.response.json; - const parsedAccount = v.parse(credentialAccountSchema, error.response.json); - queryClient.setQueryData(queryKeys.accounts.show(parsedAccount.id), parsedAccount); - dispatch({ - type: VERIFY_CREDENTIALS_SUCCESS, - token, - account: parsedAccount, - }); - if (account.id === getState().me) dispatch(fetchMeSuccess(parsedAccount)); - return parsedAccount; - } else { - if (getState().me === null) dispatch(fetchMeFail(error)); - dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error }); - throw error; - } + if (getState().me === null) dispatch(fetchMeFail(error)); + dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error }); + throw error; }); };