From 5adb07c8fb828eb56c4c1af96ffd0c3747727ac2 Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Thu, 27 Jun 2019 11:46:57 +0100 Subject: [PATCH] Removes unnecessary validation checking The function callers are already running validation checks --- js/interface.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/js/interface.js b/js/interface.js index 82ddeb3..363d541 100644 --- a/js/interface.js +++ b/js/interface.js @@ -1479,13 +1479,6 @@ function getCredential(credentialKey) { return Fliplet.API.request({ method: 'GET', url: 'v1/organizations/' + organizationID + '/credentials/' + credentialKey - }).then(function (credential) { - if (!credential || !credential.email) { - // Valid credential email not found - return Promise.resolve(); - } - - return Promise.resolve(credential); }).catch(function (error) { if (error && error.status === 404) { // Credential not found