mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Cleanup invalid rates/comments/shares
This commit is contained in:
parent
d74d29ad9e
commit
2ba9287131
16 changed files with 117 additions and 49 deletions
|
@ -17,11 +17,9 @@ import {
|
|||
serversBlocklistSortValidator,
|
||||
unblockServerByAccountValidator
|
||||
} from '../../../middlewares/validators'
|
||||
import { AccountModel } from '../../../models/account/account'
|
||||
import { AccountBlocklistModel } from '../../../models/account/account-blocklist'
|
||||
import { addAccountInBlocklist, addServerInBlocklist, removeAccountFromBlocklist, removeServerFromBlocklist } from '../../../lib/blocklist'
|
||||
import { ServerBlocklistModel } from '../../../models/server/server-blocklist'
|
||||
import { ServerModel } from '../../../models/server/server'
|
||||
|
||||
const myBlocklistRouter = express.Router()
|
||||
|
||||
|
@ -83,7 +81,7 @@ async function listBlockedAccounts (req: express.Request, res: express.Response)
|
|||
|
||||
async function blockAccount (req: express.Request, res: express.Response) {
|
||||
const user = res.locals.oauth.token.User
|
||||
const accountToBlock = res.locals.account
|
||||
const accountToBlock = res.locals.account
|
||||
|
||||
await addAccountInBlocklist(user.Account.id, accountToBlock.id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue