topics should be marked read correctly if you are already in it

This commit is contained in:
Baris Soner Usakli
2014-01-23 15:46:39 -05:00
parent 47c32738a6
commit 824c5072e8
6 changed files with 100 additions and 85 deletions

View File

@@ -16,7 +16,7 @@ SocketTopics.post = function(socket, data, callback) {
type: 'danger',
timeout: 2000
});
return;
return callback(new Error('not-logged-in'));
}
topics.post(socket.uid, data.title, data.content, data.category_id, function(err, result) {
@@ -44,7 +44,7 @@ SocketTopics.post = function(socket, data, callback) {
timeout: 7500
});
}
return;
return callback(err);
}
if (result) {