WIP: cart

This commit is contained in:
Nikita Kiselev
2025-07-22 00:27:40 +03:00
parent ce2c9e374d
commit 626ee6ecb0
10 changed files with 165 additions and 37 deletions

View File

@@ -2,8 +2,10 @@ import {$fetch} from "ofetch";
const BASE_URL = '/';
export default async function (action, query) {
export default async function (action, query = null, json = null) {
return await $fetch(`${BASE_URL}index.php?route=extension/tgshop/handle&api_action=${action}`, {
method: json ? 'POST' : 'GET',
query: query,
body: json,
});
};