Fix issue where app with oauth addon will not backup or uninstall
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user