mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 19:07:08 +02:00
fix: lint
This commit is contained in:
@@ -668,14 +668,12 @@ inbox.undo = async (req) => {
|
||||
const exists = await posts.exists(id);
|
||||
if (localType !== 'post' || !exists) {
|
||||
throw new Error('[[error:invalid-pid]]');
|
||||
break;
|
||||
}
|
||||
|
||||
const allowed = await privileges.posts.can('posts:upvote', id, activitypub._constants.uid);
|
||||
if (!allowed) {
|
||||
activitypub.helpers.log(`[activitypub/inbox.like] ${id} not allowed to be upvoted.`);
|
||||
throw new Error('[[error:no-privileges]]');
|
||||
break;
|
||||
}
|
||||
|
||||
await posts.unvote(id, actor);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
const nconf = require('nconf');
|
||||
const winston = require('winston');
|
||||
const { createHash, createVerify, getHashes, sign, verify } = require('crypto');
|
||||
const { createHash, getHashes, sign, verify } = require('crypto');
|
||||
const { cpus } = require('os');
|
||||
const { promisify } = require('util');
|
||||
const signAsync = promisify(sign);
|
||||
|
||||
Reference in New Issue
Block a user