콘텐츠 카테고리 API 추가
This commit is contained in:
@@ -4,12 +4,12 @@ async function saveCategory(title) {
|
||||
return Vue.axios.post('/category', {title: title, contentIdList: []});
|
||||
}
|
||||
|
||||
async function modifyCategory(title, categoryId) {
|
||||
async function modifyCategory(categoryId, title = null, addContentIdList = [], removeContentIdList = []) {
|
||||
return Vue.axios.put('/category', {
|
||||
categoryId: categoryId,
|
||||
title: title,
|
||||
addContentIdList: [],
|
||||
removeContentIdList: []
|
||||
addContentIdList: addContentIdList,
|
||||
removeContentIdList: removeContentIdList
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
18
src/api/content_category.js
Normal file
18
src/api/content_category.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import Vue from "vue";
|
||||
|
||||
async function getContentInCategory(categoryId, page) {
|
||||
return Vue.axios.get(
|
||||
"/creator-admin/content-category?category_id=" + categoryId +
|
||||
"&page=" + (page - 1) +
|
||||
"&size=10"
|
||||
)
|
||||
}
|
||||
|
||||
async function searchContentNotInCategory(categoryId, searchWord) {
|
||||
return Vue.axios.get(
|
||||
"/creator-admin/content-category/search?category_id=" + categoryId +
|
||||
"&search_word=" + searchWord
|
||||
)
|
||||
}
|
||||
|
||||
export {getContentInCategory, searchContentNotInCategory}
|
||||
Reference in New Issue
Block a user