feat: configure mock user data model for local developer logins
This commit is contained in:
parent
2145f85745
commit
f40a72786c
1 changed files with 32 additions and 1 deletions
|
|
@ -127,7 +127,38 @@ export function apiFetch(url: string, options: RequestInit = {}): Promise<Respon
|
|||
let data: any = {};
|
||||
|
||||
if (path.startsWith('/api/auth/login/')) {
|
||||
data = { access: 'mock-access-token', refresh: 'mock-refresh-token' };
|
||||
data = {
|
||||
access_token: 'mock-access-token',
|
||||
refresh_token: 'mock-refresh-token',
|
||||
user: {
|
||||
id: 1,
|
||||
username: 'tradhox_artisan',
|
||||
email: 'artisan@tradhox.com',
|
||||
profile: {
|
||||
onboarding_step: 4,
|
||||
phone_verified: true,
|
||||
email_verified: true,
|
||||
is_gstin_verified: true,
|
||||
aadhar_s3_key: 'mock_aadhar',
|
||||
pan_s3_key: 'mock_pan',
|
||||
store_name: 'Tradhox Artisan Co.',
|
||||
logo_s3_key: 'mock_logo',
|
||||
street: '123 Loom Lane',
|
||||
status: 'pending_approval',
|
||||
phone: '9876543210',
|
||||
gstin: '29AAAAA1111A1Z1',
|
||||
business_bio: 'Preserving centuries-old handloom techniques, our family has been creating pure silk and cotton textiles for three generations.',
|
||||
city: 'Textile Town',
|
||||
state: 'Karnataka',
|
||||
pincode: '560001',
|
||||
business_type: 'individual_maker',
|
||||
store_slug: 'tradhox-artisan',
|
||||
support_email: 'hello@tradhox.com',
|
||||
support_phone: '+91 98765 43210',
|
||||
selected_categories: ['Textiles & Apparel', 'Sustainable Products']
|
||||
}
|
||||
}
|
||||
};
|
||||
} else if (path.startsWith('/api/auth/register/')) {
|
||||
data = { message: 'Registration successful' };
|
||||
} else if (path.startsWith('/api/auth/verify-otp/')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue