mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-27 09:49:52 +01:00
fix: editing posts saving uncessary data
This commit is contained in:
@@ -23,7 +23,7 @@ module.exports = function (Posts) {
|
|||||||
if (!canEdit.flag) {
|
if (!canEdit.flag) {
|
||||||
throw new Error(canEdit.message);
|
throw new Error(canEdit.message);
|
||||||
}
|
}
|
||||||
let postData = await Posts.getPostData(data.pid);
|
let postData = await db.getObject('post:' + data.pid);
|
||||||
if (!postData) {
|
if (!postData) {
|
||||||
throw new Error('[[error:no-post]]');
|
throw new Error('[[error:no-post]]');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user