From 8ea747c9274f3144283e5f896b37bbd581d1e8ae Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 25 Jan 2026 08:45:39 +0300 Subject: [PATCH] Update auth.ts --- src/store/auth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/store/auth.ts b/src/store/auth.ts index ccee53d..3f6979c 100644 --- a/src/store/auth.ts +++ b/src/store/auth.ts @@ -33,7 +33,7 @@ interface AuthState { loginWithTelegram: (initData: string) => Promise loginWithTelegramWidget: (data: TelegramWidgetData) => Promise loginWithEmail: (email: string, password: string) => Promise - registerWithEmail: (email: string, password: string, firstName?: string) => Promise + registerWithEmail: (email: string, password: string, firstName?: string, referralCode?: string) => Promise } // Блокировка для предотвращения race condition при инициализации @@ -262,12 +262,13 @@ export const useAuthStore = create()( get().checkAdminStatus() }, - registerWithEmail: async (email, password, firstName) => { + registerWithEmail: async (email, password, firstName, referralCode) => { const response = await authApi.registerEmailStandalone({ email, password, first_name: firstName, language: navigator.language.split('-')[0] || 'ru', + referral_code: referralCode, }) tokenStorage.setTokens(response.access_token, response.refresh_token) set({