Commit 9ca024f6 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Match linkTelegram() to the backend's linking-not-login response shape

/auth/telegram/login now requires the caller to already be authenticated
and returns a simple confirmation instead of a fresh token pair (see the
stax_backend_api commit fixing it to actually link to the caller instead
of creating a disconnected identity). Updated the return type and dropped
auth: false accordingly - no UI calls this yet, so nothing else changes.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 3e3b3516
Pipeline #1102 canceled with stage
......@@ -48,10 +48,9 @@ export function requestTelegramCode(phoneNumber: string) {
}
export function linkTelegram(phoneNumber: string, phoneCodeHash: string, code: string) {
return apiFetch<TokenPair>('/auth/telegram/login', {
return apiFetch<{ status: string; phone_number: string }>('/auth/telegram/login', {
method: 'POST',
json: { phone_number: phoneNumber, phone_code_hash: phoneCodeHash, code },
auth: false,
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment