mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 01:56:12 +01:00
feat: user exist route in write api
This commit is contained in:
@@ -30,6 +30,8 @@ require('./user/ban')(SocketUser);
|
||||
require('./user/registration')(SocketUser);
|
||||
|
||||
SocketUser.exists = async function (socket, data) {
|
||||
sockets.warnDeprecated(socket, 'HEAD /api/v3/users/bySlug/:userslug');
|
||||
|
||||
if (!data || !data.username) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user