Split types and typings
[oweals/peertube.git] / server / models / account / user-video-history.ts
index 3fe4c8db1c8823921c9e5b07209e58e799f7a5ec..76b469fbfa77a1c079e5df40e6e6b51c3dd82643 100644 (file)
@@ -2,7 +2,7 @@ import { AllowNull, BelongsTo, Column, CreatedAt, ForeignKey, IsInt, Model, Tabl
 import { VideoModel } from '../video/video'
 import { UserModel } from './user'
 import { DestroyOptions, Op, Transaction } from 'sequelize'
-import { MUserAccountId, MUserId } from '@server/typings/models'
+import { MUserAccountId, MUserId } from '@server/types/models'
 
 @Table({
   tableName: 'userVideoHistory',
@@ -59,7 +59,7 @@ export class UserVideoHistoryModel extends Model<UserVideoHistoryModel> {
     return VideoModel.listForApi({
       start,
       count,
-      sort: '-UserVideoHistories.updatedAt',
+      sort: '-"userVideoHistory"."updatedAt"',
       nsfw: null, // All
       includeLocalVideos: true,
       withFiles: false,