at the end of the day, it was inevitable

This commit is contained in:
Mo Elzubeir
2022-12-09 08:36:26 -06:00
commit 1218570914
1768 changed files with 887087 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import {createApi} from '../common/Common'
export const getCategories = createApi('GET', '/api/v1/categories')
//payload = {name, parent}
export const addCategory = createApi('POST', '/api/v1/categories', {
urlData: (payload, feedId) => ({feedId})
})
//payload = {name, parent}
export const renameCategory = createApi('PUT', '/api/v1/categories/{categoryId}', {
urlData: (payload, categoryId) => ({categoryId})
})
export const moveCategory = createApi('POST', '/api/v1/categories/{categoryId}/move_to/{newCategoryId}', {
urlData: (payload, categoryId, newCategoryId) => ({categoryId, newCategoryId})
})
//payload = {name, parent}
export const deleteCategory = createApi('DELETE', '/api/v1/categories/{categoryId}', {
urlData: (payload, categoryId) => ({categoryId})
})