mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Stronger model typings
This commit is contained in:
@@ -48,6 +48,7 @@ import { CONFIG } from '../../../initializers/config'
|
||||
import { sequelizeTypescript } from '../../../initializers/database'
|
||||
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
||||
import { UserRegister } from '../../../../shared/models/users/user-register.model'
|
||||
import { MUser, MUserAccountDefault } from '@server/typings/models'
|
||||
|
||||
const auditLogger = auditLoggerFactory('users')
|
||||
|
||||
@@ -359,7 +360,7 @@ function success (req: express.Request, res: express.Response) {
|
||||
res.end()
|
||||
}
|
||||
|
||||
async function changeUserBlock (res: express.Response, user: UserModel, block: boolean, reason?: string) {
|
||||
async function changeUserBlock (res: express.Response, user: MUserAccountDefault, block: boolean, reason?: string) {
|
||||
const oldUserAuditView = new UserAuditView(user.toFormattedJSON())
|
||||
|
||||
user.blocked = block
|
||||
|
||||
Reference in New Issue
Block a user