WIP: cart
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user