@@ -164,6 +164,10 @@ export const endpoints = {
|
||||
showCounselorTicket: '/counselor/tickets/:id',
|
||||
sendCounselorTicketMessage: '/counselor/tickets/:id/messages',
|
||||
changeCounselorTicketStatus: '/counselor/tickets/:id/status',
|
||||
|
||||
listMissionaryRequests: '/missionary/requests',
|
||||
showMissionaryRequest: '/missionary/requests/:id',
|
||||
changeMissionaryRequestStatus: '/missionary/requests/:id/status',
|
||||
}
|
||||
|
||||
export const buildUrl = (template, params = {}) =>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { http } from '@/services/api/http'
|
||||
import { buildUrl, endpoints } from '@/services/api/endpoints'
|
||||
|
||||
export const apiListMissionaryRequests = (params) =>
|
||||
http.get(endpoints.listMissionaryRequests, { params })
|
||||
|
||||
export const apiShowMissionaryRequest = (id) =>
|
||||
http.get(buildUrl(endpoints.showMissionaryRequest, { id }))
|
||||
|
||||
export const apiChangeMissionaryRequestStatus = (id, payload) =>
|
||||
http.patch(buildUrl(endpoints.changeMissionaryRequestStatus, { id }), payload)
|
||||
Reference in New Issue
Block a user