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:
parent
6f68db1be9
commit
e7753c1b62
16 changed files with 63 additions and 80 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue