studentResponsible.js 656 B

123456789101112131415161718192021
  1. import api from "src/api";
  2. export const getStudentResponsible = async (studentId) => {
  3. const { data } = await api.get(`/student/${studentId}/responsible`);
  4. return data.payload;
  5. };
  6. export const createStudentResponsible = async (payload) => {
  7. const { data } = await api.post("/student-responsible", payload);
  8. return data.payload;
  9. };
  10. export const updateStudentResponsible = async (id, payload) => {
  11. const { data } = await api.put(`/student-responsible/${id}`, payload);
  12. return data.payload;
  13. };
  14. export const deleteStudentResponsible = async (id) => {
  15. const { data } = await api.delete(`/student-responsible/${id}`);
  16. return data.payload;
  17. };