mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 21:59:40 +00:00
feat: client testing api , add ouath2
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
import axios from 'axios';
|
||||
import { LoginRequest } from '../types/auth';
|
||||
import { CreateJuniorRequest, JuniorTheme } from '../types/junior';
|
||||
import { CreateTaskRequest, TaskStatus, TaskSubmission } from '../types/task';
|
||||
|
||||
const API_BASE_URL = 'http://79.72.0.143';
|
||||
// const API_BASE_URL = 'http://79.72.0.143';
|
||||
const API_BASE_URL = 'http://localhost:5001';
|
||||
const AUTH_TOKEN = btoa('zod-digital:Zod2025'); // Base64 encode credentials
|
||||
|
||||
// Helper function to get auth header
|
||||
@ -75,11 +77,13 @@ export const authApi = {
|
||||
return apiClient.post('/api/auth/register/set-passcode', { passcode });
|
||||
},
|
||||
|
||||
login: (email: string, password: string) =>
|
||||
login: ({ grantType, email, password, appleToken, googleToken }: LoginRequest) =>
|
||||
apiClient.post('/api/auth/login', {
|
||||
grantType: 'PASSWORD',
|
||||
grantType,
|
||||
email,
|
||||
password,
|
||||
appleToken,
|
||||
googleToken,
|
||||
fcmToken: 'web-client-token', // Required by API
|
||||
signature: 'web-login', // Required by API
|
||||
}),
|
||||
|
Reference in New Issue
Block a user