X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fserver.ts;h=6eff8e9ee9eea056a2192938d50fbf5c0f5f0ee3;hb=60cfd4cb54138e7da76054aa163b33b3223b17ef;hp=d85afc2ffee8875356422d7ad5ae5ec8b0469b60;hpb=d3e56c0c4b307c99e83fbafb7f2c5884cbc20055;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/server.ts b/server/middlewares/validators/server.ts index d85afc2ff..6eff8e9ee 100644 --- a/server/middlewares/validators/server.ts +++ b/server/middlewares/validators/server.ts @@ -7,7 +7,7 @@ import { body } from 'express-validator/check' import { isUserDisplayNameValid } from '../../helpers/custom-validators/users' import { Emailer } from '../../lib/emailer' import { Redis } from '../../lib/redis' -import { CONFIG } from '../../initializers/constants' +import { CONFIG } from '../../initializers/config' const serverGetValidator = [ body('host').custom(isHostValid).withMessage('Should have a valid host'), @@ -57,7 +57,7 @@ const contactAdministratorValidator = [ .end() } - if (await Redis.Instance.isContactFormIpExists(req.ip)) { + if (await Redis.Instance.doesContactFormIpExist(req.ip)) { logger.info('Refusing a contact form by %s: already sent one recently.', req.ip) return res