Fix issue where app with oauth addon will not backup or uninstall

This commit is contained in:
Girish Ramakrishnan
2020-04-18 10:07:43 -07:00
parent 13be04a169
commit 2dcab77ed1
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -146,6 +146,13 @@ var KNOWN_ADDONS = {
backup: NOOP,
restore: NOOP,
clear: NOOP,
},
oauth: { // kept for backward compatibility. keep teardown for uninstall to work
setup: NOOP,
teardown: teardownOauth,
backup: NOOP,
restore: NOOP,
clear: NOOP,
}
};
@@ -1869,3 +1876,13 @@ function statusGraphite(callback) {
});
});
}
function teardownOauth(app, options, callback) {
assert.strictEqual(typeof app, 'object');
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof callback, 'function');
debugApp(app, 'teardownOauth');
appdb.unsetAddonConfig(app.id, 'oauth', callback);
}