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:
@@ -2,14 +2,13 @@ import axios from 'axios';
|
||||
|
||||
export const TransactionService = {
|
||||
_getAuthHeader: () => {
|
||||
const bmToken = document.cookie
|
||||
.split('; ')
|
||||
.find((row) => row.startsWith('bm-token='))
|
||||
?.split('=')[1];
|
||||
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 {
|
||||
Authorization: `Bearer ${bmToken}`
|
||||
};
|
||||
return bmToken && bmToken !== 'undefined' && bmToken !== 'null'
|
||||
? { Authorization: `Bearer ${bmToken}` }
|
||||
: {};
|
||||
},
|
||||
/**
|
||||
* Get a single transaction by ID
|
||||
|
||||
Reference in New Issue
Block a user