Browse Source

add do-not-post to image route too

master
Rich Brown 1 year ago
parent
commit
6aaedc48fe
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      routes/createRouter.js

+ 4
- 0
routes/createRouter.js View File

@@ -41,6 +41,10 @@ createRouter.post('/form', upload.single('file'), (req, res) => {
return res.status(403).json({ error: 'not an allowed filetype', url: null });
}
const tags = arrayOfTags.split(',');
// sort of a jokey thing here
if (tags.includes('do not post')) {
return res.status(422).json({ error: 'Unprocessed. -do not post- found in tags', url: null });
}
return req.app.locals.mp
.create(
{


Loading…
Cancel
Save