diff --git a/src/clients.js b/src/clients.js index b8be0839e..fe9306f8b 100644 --- a/src/clients.js +++ b/src/clients.js @@ -146,7 +146,7 @@ function getAllWithDetailsByUserId(userId, callback) { var tmp = []; async.each(results, function (record, callback) { - if (record.type === clientdb.TYPE_ADMIN) { + if (record.type === exports.TYPE_ADMIN) { record.name = constants.ADMIN_NAME; record.location = constants.ADMIN_LOCATION; @@ -161,10 +161,10 @@ function getAllWithDetailsByUserId(userId, callback) { return callback(null); // ignore error so we continue listing clients } - if (record.type === clientdb.TYPE_PROXY) record.name = result.manifest.title + ' Website Proxy'; - if (record.type === clientdb.TYPE_OAUTH) record.name = result.manifest.title + ' OAuth'; - if (record.type === clientdb.TYPE_SIMPLE_AUTH) record.name = result.manifest.title + ' Simple Auth'; - if (record.type === clientdb.TYPE_EXTERNAL) record.name = result.manifest.title + ' external'; + if (record.type === exports.TYPE_PROXY) record.name = result.manifest.title + ' Website Proxy'; + if (record.type === exports.TYPE_OAUTH) record.name = result.manifest.title + ' OAuth'; + if (record.type === exports.TYPE_SIMPLE_AUTH) record.name = result.manifest.title + ' Simple Auth'; + if (record.type === exports.TYPE_EXTERNAL) record.name = result.manifest.title + ' external'; record.location = result.location; diff --git a/src/test/database-test.js b/src/test/database-test.js index a1f92df18..966e5646a 100644 --- a/src/test/database-test.js +++ b/src/test/database-test.js @@ -849,7 +849,7 @@ describe('database', function () { var CLIENT_0 = { id: 'cid-0', appId: 'someappid_0', - type: clientdb.TYPE_OAUTH, + type: 'typeisastring', clientSecret: 'secret-0', redirectURI: 'http://foo.bar', scope: '*' @@ -858,7 +858,7 @@ describe('database', function () { var CLIENT_1 = { id: 'cid-1', appId: 'someappid_1', - type: clientdb.TYPE_OAUTH, + type: 'typeisastring', clientSecret: 'secret-', redirectURI: 'http://foo.bar', scope: '*'