Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class App extends Component {
* @returns 0 if login successful, -1 if login failure
*/
async login(user) {
console.log("App.js - login - store.getState() = ", store.getState());
// console.log("App.js - login - store.getState() = ", store.getState());
return AuthService.login(user).then((response) => {
if (response.message) {
// When the API returns `message`, that means the login has failed
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/_services/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const client = axios.create({
const request = function (options) {
let isLoggedIn = null;
if (options.headers)
isLoggedIn = options.headers["Authorization"] === "Bearer"; // TODO: change to starts with?
isLoggedIn = options.headers["Authorization"].startsWith("Bearer "); // TODO: change to starts with?

console.log("isLoggedIn = ", isLoggedIn ? "true" : "false");

Expand Down