fix: authorization / registration

This commit is contained in:
2026-05-10 21:17:17 +03:00
parent f489063a6a
commit 82d75bd46b

View File

@@ -18,6 +18,8 @@ export async function refreshAccessToken(): Promise<string> {
}) })
if (!res.ok) throw new Error('Unauthorized') if (!res.ok) throw new Error('Unauthorized')
const data = await res.json() const data = await res.json()
if (data.access_token) {
tokenStore.set(data.access_token) tokenStore.set(data.access_token)
return data.access_token as string }
return (data.access_token ?? data.result ?? true) as string
} }