mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-10 14:33:11 +08:00
Added auth headers to api requests
This commit is contained in:
4
client/src/utility/applyAuth.ts
Normal file
4
client/src/utility/applyAuth.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const applyAuth = () => {
|
||||
const token = localStorage.getItem('token') || '';
|
||||
return { Authorization: `Bearer ${token}` };
|
||||
};
|
||||
@@ -10,3 +10,4 @@ export * from './storeUIConfig';
|
||||
export * from './validators';
|
||||
export * from './parseTime';
|
||||
export * from './decodeToken';
|
||||
export * from './applyAuth';
|
||||
|
||||
Reference in New Issue
Block a user