fix
This commit is contained in:
@@ -19,6 +19,31 @@ export const endpoints = {
|
||||
updateProfile: '/profile',
|
||||
getStudentCourses: '/student/courses',
|
||||
showStudentCourse: '/student/courses/:id',
|
||||
getStudentTerms: '/student/terms',
|
||||
showStudentTerm: '/student/terms/:id',
|
||||
showStudentLesson: '/student/lessons/:id',
|
||||
showStudentSession: '/student/sessions/:id',
|
||||
submitStudentSessionHomework: '/student/sessions/:id/homework',
|
||||
showStudentExam: '/student/exams/:id',
|
||||
startStudentExamAttempt: '/student/exams/:id/attempts',
|
||||
submitStudentExamAttempt: '/student/exams/:id/submit',
|
||||
|
||||
getMissionaryProfile: '/student/missionary/profile',
|
||||
getMissionaryRequests: '/student/missionary/requests',
|
||||
getMissionaryDispatches: '/student/missionary/dispatches',
|
||||
getMissionaryNarratives: '/student/missionary/narratives',
|
||||
|
||||
getStudentServices: '/student/services',
|
||||
createStudentService: '/student/services',
|
||||
getStudentServiceTypes: '/student/service-types',
|
||||
getStudentServiceTitles: '/student/service-titles',
|
||||
|
||||
getStudentConsultants: '/student/consultants',
|
||||
createStudentConsultant: '/student/consultants',
|
||||
getStudentConsultantTitles: '/student/consultant-titles',
|
||||
|
||||
getStudentCertificates: '/student/certificates',
|
||||
downloadStudentCertificate: '/student/certificates/:id/download',
|
||||
|
||||
getPendingStudents: '/admin/pending-students',
|
||||
showPendingStudent: '/admin/pending-students/:id',
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { buildUrl, endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiGetStudentCertificates = (params) =>
|
||||
http.get(endpoints.getStudentCertificates, { params })
|
||||
|
||||
export const apiDownloadStudentCertificate = (id, format = 'pdf') =>
|
||||
http.get(buildUrl(endpoints.downloadStudentCertificate, { id }), { params: { format } })
|
||||
@@ -0,0 +1,10 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiGetStudentConsultants = (params) =>
|
||||
http.get(endpoints.getStudentConsultants, { params })
|
||||
|
||||
export const apiCreateStudentConsultant = (payload) =>
|
||||
http.post(endpoints.createStudentConsultant, payload)
|
||||
|
||||
export const apiGetStudentConsultantTitles = () => http.get(endpoints.getStudentConsultantTitles)
|
||||
@@ -0,0 +1,10 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { buildUrl, endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiShowStudentExam = (id) => http.get(buildUrl(endpoints.showStudentExam, { id }))
|
||||
|
||||
export const apiStartStudentExamAttempt = (id) =>
|
||||
http.post(buildUrl(endpoints.startStudentExamAttempt, { id }))
|
||||
|
||||
export const apiSubmitStudentExamAttempt = (id, payload) =>
|
||||
http.post(buildUrl(endpoints.submitStudentExamAttempt, { id }), payload)
|
||||
@@ -0,0 +1,4 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { buildUrl, endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiShowStudentLesson = (id) => http.get(buildUrl(endpoints.showStudentLesson, { id }))
|
||||
@@ -0,0 +1,13 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiGetMissionaryProfile = () => http.get(endpoints.getMissionaryProfile)
|
||||
|
||||
export const apiGetMissionaryRequests = (params) =>
|
||||
http.get(endpoints.getMissionaryRequests, { params })
|
||||
|
||||
export const apiGetMissionaryDispatches = (params) =>
|
||||
http.get(endpoints.getMissionaryDispatches, { params })
|
||||
|
||||
export const apiGetMissionaryNarratives = (params) =>
|
||||
http.get(endpoints.getMissionaryNarratives, { params })
|
||||
@@ -0,0 +1,12 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiGetStudentServices = (params) => http.get(endpoints.getStudentServices, { params })
|
||||
|
||||
export const apiCreateStudentService = (payload) =>
|
||||
http.post(endpoints.createStudentService, payload)
|
||||
|
||||
export const apiGetStudentServiceTypes = () => http.get(endpoints.getStudentServiceTypes)
|
||||
|
||||
export const apiGetStudentServiceTitles = (params) =>
|
||||
http.get(endpoints.getStudentServiceTitles, { params })
|
||||
@@ -0,0 +1,8 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { buildUrl, endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiShowStudentSession = (id) =>
|
||||
http.get(buildUrl(endpoints.showStudentSession, { id }))
|
||||
|
||||
export const apiSubmitStudentSessionHomework = (id, formData) =>
|
||||
http.post(buildUrl(endpoints.submitStudentSessionHomework, { id }), formData)
|
||||
@@ -0,0 +1,6 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { buildUrl, endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiGetStudentTerms = (params) => http.get(endpoints.getStudentTerms, { params })
|
||||
|
||||
export const apiShowStudentTerm = (id) => http.get(buildUrl(endpoints.showStudentTerm, { id }))
|
||||
Reference in New Issue
Block a user