fix linting errors
This commit is contained in:
parent
44f02d1159
commit
e38474ce40
2 changed files with 3 additions and 2 deletions
|
@ -11,7 +11,8 @@ export function serveProject(req, res) {
|
||||||
Project.findById(req.params.project_id)
|
Project.findById(req.params.project_id)
|
||||||
.exec((err, project) => {
|
.exec((err, project) => {
|
||||||
if (err || !project) {
|
if (err || !project) {
|
||||||
return get404Sketch(html => res.send(html));
|
get404Sketch(html => res.send(html));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// TODO this does not parse html
|
// TODO this does not parse html
|
||||||
const files = project.files;
|
const files = project.files;
|
||||||
|
|
|
@ -132,7 +132,7 @@ app.get('*', (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// error handler
|
// error handler
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, next) => {
|
||||||
if (err.code !== 'EBADCSRFTOKEN') return next(err);
|
if (err.code !== 'EBADCSRFTOKEN') return next(err);
|
||||||
|
|
||||||
console.error('Invalid CSRF Token.');
|
console.error('Invalid CSRF Token.');
|
||||||
|
|
Loading…
Reference in a new issue