18 lines
442 B
TypeScript
18 lines
442 B
TypeScript
export function getCuratorAuthHeaders() {
|
|
if (typeof window === 'undefined') {
|
|
return {
|
|
'x-curator-auth': '',
|
|
'x-curator-username': '',
|
|
};
|
|
}
|
|
|
|
const authToken = localStorage.getItem('hoerdle_curator_auth');
|
|
const username = localStorage.getItem('hoerdle_curator_username') || '';
|
|
return {
|
|
'x-curator-auth': authToken || '',
|
|
'x-curator-username': username,
|
|
};
|
|
}
|
|
|
|
|