We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4144b2 commit 9083e3eCopy full SHA for 9083e3e
1 file changed
index.js
@@ -69,7 +69,7 @@ const bodyParse = (req) => new Promise((resolve, reject) => {
69
req.on('end', () => resolve(body ? JSON.parse(body) : {}))
70
})
71
72
-const sendData = (res, data) => {
+const sendData = (res, data = null) => {
73
return res.end(`{"data": ${JSON.stringify(data)}, "error": null}`)
74
}
75
0 commit comments