fix(brand-catalog): add JWT auth token to all API requests
brand-catalog.js was missing Authorization header on fetch calls, causing 401 Unauthorized errors. Now reads pos_token from localStorage and includes Bearer token in every request. Also handles 401 responses by redirecting to /pos/login. Bump JS cache bust to v=2.
This commit is contained in:
@@ -294,6 +294,6 @@
|
||||
<script src="/pos/static/js/onboarding.js" defer></script>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/pos/sw.js',{scope:'/pos/'});}</script>
|
||||
<script src="/pos/static/js/pwa-install.js" defer></script>
|
||||
<script src="/pos/static/js/brand-catalog.js?v=1" defer></script>
|
||||
<script src="/pos/static/js/brand-catalog.js?v=2" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user