1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Prefer handle param name

This commit is contained in:
Chocobozzz 2025-04-10 09:55:55 +02:00
parent 6f68db1be9
commit e7753c1b62
No known key found for this signature in database
GPG key ID: 583A612D890159BE
16 changed files with 63 additions and 80 deletions

View file

@ -177,7 +177,7 @@ function buildModerationHelpers () {
},
blockAccount: async (options: { byAccountId: number, handleToBlock: string }) => {
const accountToBlock = await AccountModel.loadByNameWithHost(options.handleToBlock)
const accountToBlock = await AccountModel.loadByHandle(options.handleToBlock)
if (!accountToBlock) return
const user = await UserModel.loadByAccountId(options.byAccountId)
@ -190,7 +190,7 @@ function buildModerationHelpers () {
},
unblockAccount: async (options: { byAccountId: number, handleToUnblock: string }) => {
const targetAccount = await AccountModel.loadByNameWithHost(options.handleToUnblock)
const targetAccount = await AccountModel.loadByHandle(options.handleToUnblock)
if (!targetAccount) return
const accountBlock = await AccountBlocklistModel.loadByAccountAndTarget(options.byAccountId, targetAccount.id)