Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Aug 29, 2024
1 parent 433c09c commit 67248b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { util } from './util.js';
import { storage } from './storage.js';
import { session } from './session.js';
import { comment } from './comment.js';
import { bootstrap } from './bootstrap.js';
import { request, HTTP_GET, HTTP_PATCH, HTTP_PUT } from './request.js';

export const admin = (() => {
Expand Down
3 changes: 2 additions & 1 deletion js/guest.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { util } from './util.js';
import { audio } from './audio.js';
import { theme } from './theme.js';
import { session } from "./session";
Expand Down Expand Up @@ -70,7 +71,7 @@ export const guest = (() => {

document.body.style.overflowY = 'scroll';
document.body.scrollIntoView({ behavior: 'instant' });
opacity('welcome', 0.025);
util.opacity('welcome', 0.025);

audio.play();
audio.showButton();
Expand Down
3 changes: 2 additions & 1 deletion js/request.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { dto } from "./dto.js";
import { session } from "./session.js";

export const HTTP_GET = 'GET';
export const HTTP_POST = 'POST';
Expand Down Expand Up @@ -61,7 +62,7 @@ export const request = (method, path) => {
});
},
token(token) {
if (token.split('.').length === 3) {
if (session.isAdmin()) {
req.headers.append('Authorization', 'Bearer ' + token);
return this;
}
Expand Down

0 comments on commit 67248b8

Please sign in to comment.