콘텐츠 카테고리 관리 UI 추가
This commit is contained in:
28
src/api/category.js
Normal file
28
src/api/category.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function saveCategory(title) {
|
||||
return Vue.axios.post('/category', {title: title, contentIdList: []});
|
||||
}
|
||||
|
||||
async function modifyCategory(title, categoryId) {
|
||||
return Vue.axios.put('/category', {
|
||||
categoryId: categoryId,
|
||||
title: title,
|
||||
addContentIdList: [],
|
||||
removeContentIdList: []
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteCategory(categoryId) {
|
||||
return Vue.axios.delete('/category/' + categoryId)
|
||||
}
|
||||
|
||||
async function getCategoryList(creatorId) {
|
||||
return Vue.axios.get('/category?creatorId=' + creatorId)
|
||||
}
|
||||
|
||||
async function updateCategoryOrders(ids) {
|
||||
return Vue.axios.put('/category/orders', {ids: ids})
|
||||
}
|
||||
|
||||
export {saveCategory, modifyCategory, deleteCategory, getCategoryList, updateCategoryOrders}
|
||||
Reference in New Issue
Block a user