17 lines
680 B
TypeScript
17 lines
680 B
TypeScript
// /* eslint-disable */
|
|
import { api } from 'src/boot/axios';
|
|
import type { EmployeeListTableItem } from '../types/employee-list-table-interface';
|
|
import type { EmployeeProfile } from '../types/employee-profile-interface';
|
|
|
|
|
|
export const EmployeeListService = {
|
|
getEmployeeList: async (): Promise<EmployeeListTableItem[]> => {
|
|
const response = await api.get<EmployeeListTableItem[]>('/employees/employee-list')
|
|
return response.data;
|
|
},
|
|
|
|
getEmployeeDetails: async (email: string): Promise<EmployeeProfile> => {
|
|
const response = await api.get<EmployeeProfile>('employees/profile/' + email);
|
|
return response.data;
|
|
},
|
|
}; |