mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 14:16:25 +02:00
refactor(api): deprecated groups update socket in favour of API lib
This commit is contained in:
@@ -24,6 +24,13 @@ module.exports = function (Groups) {
|
||||
values: values,
|
||||
}));
|
||||
|
||||
// Case some values as bool (if not boolean already)
|
||||
['userTitleEnabled', 'private', 'hidden', 'disableJoinRequests', 'disableLeave'].forEach((prop) => {
|
||||
if (values.hasOwnProperty(prop) && typeof values[prop] !== 'boolean') {
|
||||
values[prop] = !!parseInt(values[prop], 10);
|
||||
}
|
||||
});
|
||||
|
||||
const payload = {
|
||||
description: values.description || '',
|
||||
icon: values.icon || '',
|
||||
|
||||
Reference in New Issue
Block a user