Skip to content

Commit

Permalink
fix: appropriate 404 handling for write API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Oct 16, 2020
1 parent ede9435 commit b6cce75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routes/write/index.js
Expand Up @@ -55,4 +55,9 @@ Write.reload = async (params) => {
});
winston.info(`[api] Adding ${pluginRouter.stack.length} route(s) to \`api/v3/plugins\``);
router.use('/api/v3/plugins', pluginRouter);

// 404 handling
router.use('/api/v3', (req, res) => {
helpers.formatApiResponse(404, res);
});
};

0 comments on commit b6cce75

Please sign in to comment.