feat: new settings and mainpage blocks

This commit is contained in:
2025-11-11 00:30:39 +03:00
parent 5fb45000ac
commit 6176c720b1
97 changed files with 1842 additions and 1658 deletions

View File

@@ -16,7 +16,7 @@ export const apiFetch = ofetch.create({
options.headers = {
...options.headers,
'X-Telegram-InitData': encoded,
}
};
}
},
});
@@ -24,7 +24,7 @@ export const apiFetch = ofetch.create({
async function ftch(action, query = null, json = null) {
const options = {
method: json ? 'POST' : 'GET',
}
};
if (query) options.query = query;
if (json) options.body = json;
@@ -92,8 +92,8 @@ export async function setVoucher(voucher) {
});
}
export async function fetchBanner() {
return await ftch('banner');
export async function processBlock(block) {
return await ftch('processBlock', null, block);
}
export default ftch;