fix: lint

This commit is contained in:
Julian Lam
2026-04-09 15:35:53 -04:00
parent d611e259f8
commit 080aac5114
2 changed files with 1 additions and 3 deletions

View File

@@ -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);

View File

@@ -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);