feat(gift): 관리자 선물 카테고리 CRUD 추가

This commit is contained in:
Yu Sung
2026-10-01 12:59:06 +09:00
parent 87d9121ca9
commit 596aab54b6
7 changed files with 837 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
import Vue from 'vue';
import { buildGiftCategoryRequest } from '@/utils/gift_category'
const baseUrl = '/api/v2/admin/gift-categories'
async function getGiftCategories() {
const response = await Vue.axios.get(baseUrl)
return response.data
}
async function createGiftCategory(form) {
const response = await Vue.axios.post(baseUrl, buildGiftCategoryRequest(form))
return response.data
}
async function updateGiftCategory(categoryId, form) {
const response = await Vue.axios.put(`${baseUrl}/${encodeURIComponent(categoryId)}`, buildGiftCategoryRequest(form))
return response.data
}
async function deactivateGiftCategory(categoryId) {
const response = await Vue.axios.delete(`${baseUrl}/${encodeURIComponent(categoryId)}`)
return response.data
}
export { getGiftCategories, createGiftCategory, updateGiftCategory, deactivateGiftCategory }