added version
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { aj as supabaseService, b as useUserStore, N as myAxios } from './server.mjs';
|
||||
|
||||
const createSave = async (product_id) => {
|
||||
return await myAxios.post("/media/create-save", { product_id });
|
||||
};
|
||||
const deleteSave = async (product_id) => supabaseService.fetch("saved", "delete", {
|
||||
field: ["user_id", "product_id"],
|
||||
value: [useUserStore().user.id, product_id]
|
||||
});
|
||||
const getUserSaved = async (id, page = 1, limit = 10) => {
|
||||
return await myAxios.post(`/media/user-saved-posts/${id}`, { page, limit });
|
||||
};
|
||||
|
||||
export { createSave as c, deleteSave as d, getUserSaved as g };
|
||||
Reference in New Issue
Block a user