]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/job-queue/handlers/video-views.ts
Stricter models typing
[github/Chocobozzz/PeerTube.git] / server / lib / job-queue / handlers / video-views.ts
index 7211df237d36de81dd66d741d7f17d6c76885ff8..86d0a271f12a52d33111c56b6630ba986b9f8b22 100644 (file)
@@ -1,7 +1,7 @@
 import { Redis } from '../../redis'
 import { logger } from '../../../helpers/logger'
 import { VideoModel } from '../../../models/video/video'
-import { VideoViewModel } from '../../../models/video/video-views'
+import { VideoViewModel } from '../../../models/video/video-view'
 import { isTestInstance } from '../../../helpers/core-utils'
 import { federateVideoIfNeeded } from '../../activitypub/videos'
 
@@ -36,8 +36,8 @@ async function processVideosViews () {
           }
 
           await VideoViewModel.create({
-            startDate,
-            endDate,
+            startDate: new Date(startDate),
+            endDate: new Date(endDate),
             views,
             videoId
           })