import { $get, $post } from "@/plugins/axios";

// course-manage
export const courseList = datas => {
  return $get("/backend/course/listCoursePage", datas);
};
export const updateCourse = datas => {
  if (datas.id) {
    return $post("/backend/course/updateCourse", datas);
  } else {
    return $post("/backend/course/addCourse", datas);
  }
};
export const deleteCourse = id => {
  return $post("/backend/course/deleteCourse", { id });
};
export const updateCourseStatus = ({ id, status }) => {
  return $post("/backend/course/updateCourseStatus", { id, status });
};
