fix(dashboard): fix properties freeze, category/feature list views, and auth interceptor
deploy-chabokan / deploy (push) Canceled after 0s

This commit is contained in:
2026-08-19 07:08:43 +03:30
parent b81a85f672
commit 3723f801e7
14 changed files with 456 additions and 247 deletions
+4 -5
View File
@@ -1,11 +1,10 @@
import axios from 'axios';
const getAuthHeader = () => {
const bmToken = document.cookie
.split('; ')
.find((row) => row.startsWith('bm-token='))
?.split('=')[1];
return { Authorization: `Bearer ${bmToken}` };
const bmToken = (typeof document !== 'undefined'
? document.cookie.split('; ').find((row) => row.startsWith('bm-token='))?.split('=')[1]
: null) || (typeof localStorage !== 'undefined' ? localStorage.getItem('bm-token') : null);
return bmToken && bmToken !== 'undefined' && bmToken !== 'null' ? { Authorization: `Bearer ${bmToken}` } : {};
};
export const WarehouseItemService = {