NeoScan_Physician/app/modules/Auth/services/authAPI.ts
2025-07-24 20:06:12 +05:30

32 lines
1.1 KiB
TypeScript

/*
* File: authAPI.ts
* Description: API service for authentication using apisauce
* Design & Developed by Tech4Biz Solutions
* Copyright (c) Spurrin Innovations. All rights reserved.
*/
import { create } from 'apisauce';
import { BASE_URL } from '../../../constants/URLS';
import { buildHeaders } from '../../../../shared/src/utils/helpers/Api';
const api = create({
baseURL: BASE_URL, // TODO: Replace with actual endpoint
});
/**
* login - authenticates user with email and password
*/
export const authAPI = {
login: (email: string, password: string,platform:string) => api.post('/api/auth/auth/login', { email, password,platform },buildHeaders()),
//fetch hospital list
gethospitals: () => api.get('/api/hospitals/hospitals/app_user/hospitals', {},buildHeaders()),
//user signup
signup: (formData:any) => api.post('/api/auth/auth/admin/create-user-fromapp', formData,buildHeaders({ contentType: 'multipart/form-data' })),
// Add more endpoints as needed
};
/*
* End of File: authAPI.ts
* Design & Developed by Tech4Biz Solutions
* Copyright (c) Spurrin Innovations. All rights reserved.
*/