mirror of
https://github.com/AmanTahiliani/PeerNotes.git
synced 2026-08-07 19:56:19 -04:00
get basic results page working
This commit is contained in:
10
frontend/src/utils/getAuthHeaders.ts
Normal file
10
frontend/src/utils/getAuthHeaders.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { getSessionCookie } from "../contexts/session";
|
||||
export const getAuthHeaders = () => {
|
||||
const token = getSessionCookie();
|
||||
// const token = localStorage.getItem('authToken');
|
||||
console.log("Using token for API call:", token);
|
||||
return {
|
||||
'Authorization': `Token ${token}`,
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user