mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-24 00:09:41 +01:00
13 lines
248 B
JavaScript
13 lines
248 B
JavaScript
'use strict';
|
|
|
|
const widgets = require('../../widgets');
|
|
|
|
const Widgets = module.exports;
|
|
|
|
Widgets.set = async function (socket, data) {
|
|
if (!Array.isArray(data)) {
|
|
throw new Error('[[error:invalid-data]]');
|
|
}
|
|
await widgets.setAreas(data);
|
|
};
|