fix(dashboard): fix properties freeze, category/feature list views, and auth interceptor
deploy-chabokan / deploy (push) Canceled after 0s
deploy-chabokan / deploy (push) Canceled after 0s
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user