domaindb.upsert is not used

This commit is contained in:
Girish Ramakrishnan
2018-01-20 10:18:06 -08:00
parent 0eaea12818
commit b64c41758e
-15
View File
@@ -7,7 +7,6 @@ exports = module.exports = {
get: get,
getAll: getAll,
update: update,
upsert: upsert,
del: del,
_clear: clear,
@@ -68,20 +67,6 @@ function add(name, domain, callback) {
});
}
function upsert(domain, zoneName, provider, config, callback) {
assert.strictEqual(typeof domain, 'string');
assert.strictEqual(typeof zoneName, 'string');
assert.strictEqual(typeof provider, 'string');
assert.strictEqual(typeof config, 'object');
assert.strictEqual(typeof callback, 'function');
database.query('REPLACE INTO domains (domain, zoneName, provider, configJson) VALUES (?, ?, ?, ?)', [ domain, zoneName, provider, JSON.stringify(config) ], function (error) {
if (error) return callback(new DatabaseError(DatabaseError.INTERNAL_ERROR, error));
callback(null);
});
}
function update(domain, provider, config, callback) {
assert.strictEqual(typeof domain, 'string');
assert.strictEqual(typeof provider, 'string');