Skip to content

Commit

Permalink
validate
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahvdAa committed Apr 3, 2022
1 parent 49686b6 commit 424719a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ app.get('/api/stats', (req, res) => {
});

app.post('/updateorders', upload.single('image'), async (req, res) => {
if (!req.body.reason || !req.body.password || req.body.password != process.env.PASSWORD) {
if (!req.body || !req.body.reason || !req.body.password || req.body.password != process.env.PASSWORD) {
res.send('Ongeldig wachtwoord!');
fs.unlinkSync(req.file.path);
return;
Expand Down

0 comments on commit 424719a

Please sign in to comment.