Skip to content

Commit 19eae70

Browse files
style: Format code
1 parent 52b6fa5 commit 19eae70

File tree

2 files changed

+37
-34
lines changed

2 files changed

+37
-34
lines changed

assets/index.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
const assets = [
2-
{
3-
path: 'bootstrap',
4-
modulePath: 'bootstrap/dist',
5-
},
6-
{
7-
path: 'jquery',
8-
modulePath: 'jquery/dist',
9-
},
10-
{
11-
path: 'octicons',
12-
modulePath: '@primer/octicons/build',
13-
},
14-
{
15-
path: 'filesize',
16-
modulePath: 'filesize/lib',
17-
}, {
18-
path: 'xterm',
19-
modulePath: 'xterm',
20-
}, {
21-
path: 'xterm-addon-attach',
22-
modulePath: 'xterm-addon-attach',
23-
}, {
24-
path: 'xterm-addon-fit',
25-
modulePath: 'xterm-addon-fit',
26-
}
2+
{
3+
path: "bootstrap",
4+
modulePath: "bootstrap/dist",
5+
},
6+
{
7+
path: "jquery",
8+
modulePath: "jquery/dist",
9+
},
10+
{
11+
path: "octicons",
12+
modulePath: "@primer/octicons/build",
13+
},
14+
{
15+
path: "filesize",
16+
modulePath: "filesize/lib",
17+
},
18+
{
19+
path: "xterm",
20+
modulePath: "xterm",
21+
},
22+
{
23+
path: "xterm-addon-attach",
24+
modulePath: "xterm-addon-attach",
25+
},
26+
{
27+
path: "xterm-addon-fit",
28+
modulePath: "xterm-addon-fit",
29+
},
2730
];
2831

29-
3032
module.exports = assets;
31-

index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,28 @@ app.set("view engine", "handlebars");
7373

7474
app.use("/@assets", express.static(path.join(__dirname, "assets")));
7575
// init assets
76-
assets.forEach(asset => {
76+
assets.forEach((asset) => {
7777
const { path: url, modulePath } = asset;
7878
app.use(
7979
`/@assets/${url}`,
8080
express.static(path.join(__dirname, `node_modules/${modulePath}`))
8181
);
82-
})
82+
});
8383

8484
app.use(
8585
session({
8686
secret: process.env.SESSION_KEY || "meowmeow",
8787
resave: false,
88-
saveUninitialized: false
88+
saveUninitialized: false,
8989
})
9090
);
9191
app.use(flash());
9292
app.use(busboy());
93-
app.use(express.urlencoded({
94-
extended: false
95-
}));
93+
app.use(
94+
express.urlencoded({
95+
extended: false,
96+
})
97+
);
9698
// AUTH
9799

98100
const KEY = process.env.KEY
@@ -385,7 +387,7 @@ app.get("/*@download", (req, res) => {
385387
let files = null;
386388
try {
387389
files = JSON.parse(req.query.files);
388-
} catch (e) { }
390+
} catch (e) {}
389391
if (!files || !files.map) {
390392
req.flash("error", "No files selected.");
391393
res.redirect("back");

0 commit comments

Comments
 (0)