{
- history.push('/category-details/category_id=' + index);
+ history.push('/category-details/category_id=' + category._id);
}}>
{category.icon}
diff --git a/src/services/shelf.ts b/src/services/shelf.ts
index 75a7ae8..5746c1f 100644
--- a/src/services/shelf.ts
+++ b/src/services/shelf.ts
@@ -1,19 +1,23 @@
import axios from "axios";
import { API_TOKEN, SERVER_URL } from "../App";
+import { viewPermissionType } from "../shared/models/variables";
-export const getAllShelf = async (categoryId: string) => {
- return await axios.get(SERVER_URL + '/shelf/details/?_id=' + { categoryId: categoryId },
+export const getShelfDetails = async (categoryId: string) => {
+ return await axios.get(SERVER_URL + '/shelf/details/?_id=' + categoryId,
{
headers: API_TOKEN
})
}
-export const addShelf = async (categoryId: string, name: string) => {
+export const addShelf = async (categoryId: string, name: string, isArchived: boolean, viewType: viewPermissionType, description?: string) => {
return await axios.post(SERVER_URL + '/shelf/add/',
{
categoryId: categoryId,
- name: name
+ name: name,
+ description: description,
+ isArchived: isArchived,
+ viewType: viewType
},
{
headers: API_TOKEN
diff --git a/src/shared b/src/shared
index f4b5742..d222fdf 160000
--- a/src/shared
+++ b/src/shared
@@ -1 +1 @@
-Subproject commit f4b5742e27cf554dc922fa1af415bafea7214b30
+Subproject commit d222fdf4c43980569323c9d50371c2d9be6b03b0