]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/video.ts
Stricter models typing
[github/Chocobozzz/PeerTube.git] / server / lib / video.ts
index 21e4b7ff21402e9a3e6a87e2e52001b3a49ed525..d26cf85cd1ed0bc686059342b965c380a3b2504c 100644 (file)
@@ -28,6 +28,8 @@ function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): Fil
     privacy: videoInfo.privacy || VideoPrivacy.PRIVATE,
     channelId: channelId,
     originallyPublishedAt: videoInfo.originallyPublishedAt
+      ? new Date(videoInfo.originallyPublishedAt)
+      : null
   }
 }