콘텐츠 카테고리 관리 UI 추가

This commit is contained in:
Yu Sung
2024-02-06 21:50:19 +09:00
parent 82674796e8
commit 565205be92
3 changed files with 423 additions and 0 deletions

28
src/api/category.js Normal file
View 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}