Skip to content

Commit

Permalink
added if token
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrov-site committed May 21, 2024
1 parent 4336069 commit 8840098
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/helpers/setHeaders.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const setHeaders = (headers) => {
const token = localStorage.getItem('token');
if (!token) {
headers.set('Authorization', `Bearer ${null}`);
} else {
if (token) {
headers.set('Authorization', `Bearer ${token}`);
}
return headers;
Expand Down

0 comments on commit 8840098

Please sign in to comment.