mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-04 06:40:44 +01:00
show proper error if user is not logged in
This commit is contained in:
@@ -100,6 +100,9 @@ module.exports = function(SocketPosts) {
|
||||
};
|
||||
|
||||
function favouriteCommand(socket, command, eventName, notification, data, callback) {
|
||||
if (!socket.uid) {
|
||||
return callback(new Error('[[error:not-logged-in]]'))
|
||||
}
|
||||
if(!data || !data.pid || !data.room_id) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user