mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-16 23:51:51 +02:00
breaking: remove socket.emit('posts.move')
This commit is contained in:
@@ -208,6 +208,12 @@ async function isMainAndLastPost(pid) {
|
||||
}
|
||||
|
||||
postsAPI.move = async function (caller, data) {
|
||||
if (!caller.uid) {
|
||||
throw new Error('[[error:not-logged-in]]');
|
||||
}
|
||||
if (!data || !data.pid || !data.tid) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
const canMove = await Promise.all([
|
||||
privileges.topics.isAdminOrMod(data.tid, caller.uid),
|
||||
privileges.posts.canMove(data.pid, caller.uid),
|
||||
|
||||
Reference in New Issue
Block a user