panel-auth-fixes
Some checks failed
Deploy on push / deploy (push) Failing after 5s

This commit is contained in:
2025-07-25 09:46:52 +03:00
parent 0bccd0d87e
commit 243367134b
3 changed files with 3 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import {
getCsrfTokenFromCookie, getCsrfTokenFromCookie,
saveAuthToken saveAuthToken
} from '../utils/auth' } from '../utils/auth'
import { AuthSuccess } from '~/graphql/generated/graphql'
/** /**
* Модуль авторизации * Модуль авторизации
* @module auth * @module auth
@@ -159,7 +160,7 @@ export const AuthProvider: Component<AuthProviderProps> = (props) => {
export const logout = async () => { export const logout = async () => {
console.log('[Auth] Executing standalone logout...') console.log('[Auth] Executing standalone logout...')
try { try {
const result = await query<{ logout: { success: boolean } }>( const result = await query<{ logout: AuthSuccess }>(
`${location.origin}/graphql`, `${location.origin}/graphql`,
ADMIN_LOGOUT_MUTATION ADMIN_LOGOUT_MUTATION
) )

View File

@@ -19,7 +19,6 @@ export const ADMIN_LOGOUT_MUTATION = `
mutation AdminLogout { mutation AdminLogout {
logout { logout {
success success
message
} }
} }
` `

View File

@@ -148,7 +148,7 @@ async def logout(_: None, info: GraphQLResolveInfo, **kwargs: Any) -> dict[str,
return result return result
except Exception as e: except Exception as e:
logger.error(f"Ошибка выхода: {e}") logger.error(f"Ошибка выхода: {e}")
return {"success": False, "message": str(e)} return {"success": False}
@mutation.field("refreshToken") @mutation.field("refreshToken")