diff --git a/lib/middleware/validator.js b/lib/middleware/validator.js index c66b05328f..0cb71c33d3 100644 --- a/lib/middleware/validator.js +++ b/lib/middleware/validator.js @@ -5,7 +5,7 @@ const validator = require('express-validator'); module.exports = function() { return validator({ customValidators: { - isUrlFirendlyName: input => encodeURIComponent(input) === input, + isUrlFriendlyName: input => encodeURIComponent(input) === input, }, }); }; diff --git a/lib/routes/admin-api/feature.js b/lib/routes/admin-api/feature.js index a7f565efc8..954f8c2938 100644 --- a/lib/routes/admin-api/feature.js +++ b/lib/routes/admin-api/feature.js @@ -108,7 +108,7 @@ module.exports.router = function(config) { router.post('/validate', (req, res) => { req.checkBody('name', 'Name is required').notEmpty(); - req.checkBody('name', 'Name must be URL friendly').isUrlFirendlyName(); + req.checkBody('name', 'Name must be URL friendly').isUrlFriendlyName(); validateRequest(req) .then(validateUniqueName) @@ -118,7 +118,7 @@ module.exports.router = function(config) { router.post('/', (req, res) => { req.checkBody('name', 'Name is required').notEmpty(); - req.checkBody('name', 'Name must be URL friendly').isUrlFirendlyName(); + req.checkBody('name', 'Name must be URL friendly').isUrlFriendlyName(); const userName = extractUser(req);