mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Remove unused v2 code from /website/common/script (#8034)
* remove apiv2 behavior from ops * remove apiv2 behavior from fns
This commit is contained in:
committed by
Blade Barringer
parent
8f9ed6e377
commit
5f0c1687b5
@@ -14,14 +14,10 @@ module.exports = function addWebhook (user, req = {}) {
|
||||
|
||||
user.markModified('preferences.webhooks');
|
||||
|
||||
if (req.v2 === true) {
|
||||
return user.preferences.webhooks;
|
||||
} else {
|
||||
return [
|
||||
refPush(wh, {
|
||||
url: req.body.url,
|
||||
enabled: req.body.enabled,
|
||||
}),
|
||||
];
|
||||
}
|
||||
return [
|
||||
refPush(wh, {
|
||||
url: req.body.url,
|
||||
enabled: req.body.enabled,
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user