Merge remote-tracking branch 'hub/dev' into feature/biome

This commit is contained in:
Untone 2024-02-04 09:07:46 +03:00
commit 1676b2fda9

View File

@ -276,7 +276,7 @@ export const SessionProvider = (props: {
const authenticate = async (authFunction, params) => { const authenticate = async (authFunction, params) => {
const resp = await authFunction(params) const resp = await authFunction(params)
console.debug('[context.session] authenticate:', resp) console.debug('[context.session] authenticate:', resp)
if (resp?.data && !resp.errors) { if (resp?.data && resp?.errors.length === 0) {
setSession(resp.data) setSession(resp.data)
} }
return { data: resp?.data, errors: resp?.errors } return { data: resp?.data, errors: resp?.errors }