mirror of
https://github.com/AmanTahiliani/PeerNotes.git
synced 2026-08-07 11:55:12 -04:00
remove console.logs
This commit is contained in:
@@ -38,10 +38,8 @@ const MainSearch: React.FC = () => {
|
|||||||
headers: getAuthHeaders(),
|
headers: getAuthHeaders(),
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log("Professors fetched:", data);
|
|
||||||
|
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
console.log("Professors fetched:", data);
|
|
||||||
setProfessors(data);
|
setProfessors(data);
|
||||||
} else {
|
} else {
|
||||||
console.error('Data fetched is not an array:', data);
|
console.error('Data fetched is not an array:', data);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { getSessionCookie } from "../contexts/session";
|
import { getSessionCookie } from "../contexts/session";
|
||||||
export const getAuthHeaders = () => {
|
export const getAuthHeaders = () => {
|
||||||
const token = getSessionCookie();
|
const token = getSessionCookie();
|
||||||
// const token = localStorage.getItem('authToken');
|
|
||||||
console.log("Using token for API call:", token);
|
|
||||||
return {
|
return {
|
||||||
'Authorization': `Token ${token}`,
|
'Authorization': `Token ${token}`,
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|||||||
Reference in New Issue
Block a user