import {axios} from "@/requests/axios.config";

const prefix = "/course/selection";

function confirmCourseSelection(data) {
  return axios.post(`${prefix}/confirm`, data);
}

function cancelCourseSelection(data) {
  return axios.put(`${prefix}/cancel`, data);
}

function checkCourseSelection(courseId, userId) {
  return axios.get(`${prefix}/checkSelection`, {params: {courseId, userId}});
}

const courseSelectionAPIs = {
  confirmCourseSelection,
  cancelCourseSelection,
  checkCourseSelection,
};

export default courseSelectionAPIs;