Gustavo Zanatta 3 тижнів тому
батько
коміт
555d1b7e41
1 змінених файлів з 15 додано та 0 видалено
  1. 15 0
      src/api/storeItem.js

+ 15 - 0
src/api/storeItem.js

@@ -1,5 +1,20 @@
 import api from "src/api";
 
+export const getStoreItemsAssociado = async () => {
+  const { data } = await api.get("/associado/store-item");
+  return data.payload;
+};
+
+export const getMyInterestsAssociado = async () => {
+  const { data } = await api.get("/associado/store-item/my/interests");
+  return data.payload;
+};
+
+export const toggleInterestAssociado = async (id) => {
+  const { data } = await api.post(`/associado/store-item/${id}/interest`);
+  return data.payload;
+};
+
 export const getStoreItems = async () => {
   const { data } = await api.get("/store-item");
   return data.payload;