콘텐츠 카테고리 API 추가

This commit is contained in:
Yu Sung
2024-02-07 07:30:08 +09:00
parent 565205be92
commit 463d71b579
3 changed files with 343 additions and 42 deletions

View File

@@ -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
});
}

View 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}