You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
696 B
34 lines
696 B
![]()
1 year ago
|
import baseService from "./baseService"
|
||
|
|
||
|
/**
|
||
|
* @param {number} cId
|
||
|
* @param {Object} params
|
||
|
* @returns {Promise<Object>}
|
||
|
*/
|
||
|
async function findCourseHomeInro(cId, params) {
|
||
|
return await baseService.get(`/course/${cId}/getToolIntro`, params)
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {number} cId
|
||
|
* @param {Object} params
|
||
|
* @returns {Promise<Object>}
|
||
|
*/
|
||
|
async function addToolIntro(cId, params) {
|
||
|
return baseService.post(`/course/${cId}/addToolIntro`, params)
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {number} toolIntroId
|
||
|
* @returns {Promise<Object>}
|
||
|
*/
|
||
|
async function findById(toolIntroId) {
|
||
|
return await baseService.get(`/api/c_tool_intros/${toolIntroId}`)
|
||
|
}
|
||
|
|
||
|
export default {
|
||
|
findCourseHomeInro,
|
||
|
addToolIntro,
|
||
|
findById,
|
||
|
}
|