mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
some checks for purge
This commit is contained in:
@@ -227,7 +227,7 @@ function deleteOrRestore(command, socket, data, callback) {
|
||||
}
|
||||
|
||||
SocketPosts.purge = function(socket, data, callback) {
|
||||
if(!data) {
|
||||
if(!data || !parseInt(data.pid, 10)) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
postTools.purge(socket.uid, data.pid, function(err) {
|
||||
|
||||
Reference in New Issue
Block a user