Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Commit 4d3676c

Browse files
committed
Fix security issues and default page error
The onError option has been removed Fix error where cherry is not defined Update the tests to match with the fixes
1 parent c746326 commit 4d3676c

File tree

12 files changed

+313
-447
lines changed

12 files changed

+313
-447
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
3+
- "12"
34
- "11"
4-
- "10"
55
services:
66
- mysql
77
before_install:

examples/01-basic/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ const middlewares = require('./middlewares')
66
const Cherry = require('../../src/cherry')
77

88
const options = {
9-
onError: (req, res, e) => {
10-
console.log(e)
11-
res.writeHead(404)
12-
res.end('An error occured')
13-
},
149
servers: [
1510
{
1611
port: 4001

examples/02-multiple-response-type/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ const CherryHandlebarsConnector = require('@lund-org/cherry-handlebars-connector
44
const CherryPugConnector = require('@lund-org/cherry-pug-connector')
55

66
const options = {
7-
onError: (req, res, e) => {
8-
console.log(e)
9-
res.writeHead(404)
10-
res.end('An error occured')
11-
},
127
servers: [
138
{
149
port: 4003

examples/03-hooks/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ const hooks = require('./hooks')
33
const Cherry = require('../../src/cherry')
44

55
const options = {
6-
onError: (req, res, e) => {
7-
console.log(e)
8-
res.writeHead(404)
9-
res.end('An error occured')
10-
},
116
servers: [
127
{
138
port: 4004

examples/04-orm/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ const typeormConfig = {
3434
// }
3535

3636
const options = {
37-
onError: (req, res, e) => {
38-
console.log(e)
39-
res.writeHead(404)
40-
res.end('An error occured')
41-
},
4237
servers: [
4338
{
4439
port: 4005

0 commit comments

Comments
 (0)