Poprawka botto bar i wersje językowe
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const API_URL = '../../api/waiter_feed.php';
|
||||
const POLL_MS = 15000;
|
||||
const FEED_TOKEN = String(window.WAITER_CONFIG?.feedToken || '');
|
||||
|
||||
const feedList = document.getElementById('feedList');
|
||||
const emptyState = document.getElementById('emptyState');
|
||||
@@ -238,7 +239,10 @@ function setSyncState(ok, message) {
|
||||
|
||||
async function pollFeed() {
|
||||
try {
|
||||
const response = await fetch(API_URL, { cache: 'no-store' });
|
||||
const response = await fetch(API_URL, {
|
||||
cache: 'no-store',
|
||||
headers: FEED_TOKEN ? { 'X-Waiter-Token': FEED_TOKEN } : {},
|
||||
});
|
||||
const result = await response.json();
|
||||
|
||||
if (result.status !== 'success') {
|
||||
|
||||
Reference in New Issue
Block a user