2022-05-30 21:38:45 +02:00
|
|
|
import axiosInstance from './axiosInstance'
|
2022-05-22 21:28:25 +02:00
|
|
|
|
|
|
|
interface StudentResponse {
|
2022-05-30 21:38:45 +02:00
|
|
|
max_pages: number
|
|
|
|
students: {
|
|
|
|
first_name: string
|
|
|
|
last_name: string
|
|
|
|
index: number
|
|
|
|
mode: boolean
|
|
|
|
group: any
|
|
|
|
}[]
|
2022-05-22 21:28:25 +02:00
|
|
|
}
|
|
|
|
|
2022-05-30 21:38:45 +02:00
|
|
|
export const getStudents = () =>
|
|
|
|
axiosInstance.get<StudentResponse>(
|
|
|
|
'http://127.0.0.1:5000/api/coordinator/students',
|
|
|
|
)
|
|
|
|
|
|
|
|
export const uploadStudents = (payload: FormData) =>
|
|
|
|
axiosInstance.post(
|
|
|
|
'http://127.0.0.1:5000/api/coordinator/students/upload/',
|
|
|
|
payload,
|
|
|
|
)
|