nodebb-plugin-markdown 13.2.9 → 13.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controllers.js +1 -1
- package/package.json +1 -1
- package/websockets.js +1 -1
package/lib/controllers.js
CHANGED
|
@@ -27,7 +27,7 @@ Controllers.retrieveRaw = async function (req, res, next) {
|
|
|
27
27
|
if (!pid) {
|
|
28
28
|
return next();
|
|
29
29
|
}
|
|
30
|
-
const content = await postsAPI.
|
|
30
|
+
const content = await postsAPI.getRaw({ uid: req.uid }, { pid });
|
|
31
31
|
if (content === null) {
|
|
32
32
|
return next();
|
|
33
33
|
}
|
package/package.json
CHANGED
package/websockets.js
CHANGED
|
@@ -7,7 +7,7 @@ const posts = nodebb.require('./src/posts');
|
|
|
7
7
|
module.exports.checkbox = {
|
|
8
8
|
edit: async function (socket, data) {
|
|
9
9
|
const canEdit = await privileges.posts.canEdit(data.pid, socket.uid);
|
|
10
|
-
if (!canEdit) {
|
|
10
|
+
if (!canEdit.flag) {
|
|
11
11
|
throw new Error('[[error:no-privileges]]');
|
|
12
12
|
}
|
|
13
13
|
|