]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/express-utils.ts
Delete correctly redundancy files
[github/Chocobozzz/PeerTube.git] / server / helpers / express-utils.ts
index 9cf8fbeac23fd608fd6644ade77533ee577c727b..8a9cee8c57a72756f857f44d14bb6cd3edc7c0c7 100644 (file)
@@ -6,6 +6,7 @@ import { User } from '../../shared/models/users'
 import { deleteFileAsync, generateRandomString } from './utils'
 import { extname } from 'path'
 import { isArray } from './custom-validators/misc'
+import { UserModel } from '../models/account/user'
 
 function buildNSFWFilter (res: express.Response, paramNSFW?: string) {
   if (paramNSFW === 'true') return true
@@ -13,7 +14,7 @@ function buildNSFWFilter (res: express.Response, paramNSFW?: string) {
   if (paramNSFW === 'both') return undefined
 
   if (res.locals.oauth) {
-    const user: User = res.locals.oauth.token.User
+    const user: UserModel = res.locals.oauth.token.User
 
     // User does not want NSFW videos
     if (user.nsfwPolicy === 'do_not_list') return false