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)
