feat: new settings and mainpage blocks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user