mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
refactor: move groups.leave, fix some tests
This commit is contained in:
@@ -12,6 +12,9 @@ const events = require('../events');
|
||||
const usersAPI = module.exports;
|
||||
|
||||
usersAPI.create = async function (caller, data) {
|
||||
if (!data) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
const uid = await user.create(data);
|
||||
return await user.getUserData(uid);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user