From b3eef8718d2438ced93c1b44e4ddbbfffb056153 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Wed, 16 Dec 2020 15:42:22 +0200 Subject: [PATCH] fix: validation country and phone number. --- server/src/api/controllers/Authentication.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/api/controllers/Authentication.ts b/server/src/api/controllers/Authentication.ts index 54160e6e5..a63880c5b 100644 --- a/server/src/api/controllers/Authentication.ts +++ b/server/src/api/controllers/Authentication.ts @@ -122,9 +122,9 @@ export default class AuthenticationController extends BaseController{ // Focus with me! In case whitelist is not empty and the given coutry is not // in whitelist throw the error. // - // And in case the blacklist is not empty and the given country exists + // Or in case the blacklist is not empty and the given country exists // in the blacklist throw the goddamn error. - (whitelist.length > 0 && whitelist.indexOf(value) === -1) && + (whitelist.length > 0 && whitelist.indexOf(value) === -1) || (blacklist.length > 0 && blacklist.indexOf(value) !== -1) ) { throw new Error('The country code is not supported yet.');