import { http } from '@/services/api/http'
import { buildUrl, endpoints } from '@/services/api/endpoints'

export const apiListMissionaryMemories = (params) =>
  http.get(endpoints.listMissionaryMemories, { params })

export const apiCreateMissionaryMemory = (payload) =>
  http.post(endpoints.createMissionaryMemory, payload)

export const apiUpdateMissionaryMemory = (id, payload) =>
  http.patch(buildUrl(endpoints.updateMissionaryMemory, { id }), payload)

export const apiDeleteMissionaryMemory = (id) =>
  http.delete(buildUrl(endpoints.deleteMissionaryMemory, { id }))
