Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(videos): keep the create input typed while dropping copied timestamps

Richie McIlroybfed9e09395b
diff --git a/packages/web-backend/src/Videos/VideosRepo.ts b/packages/web-backend/src/Videos/VideosRepo.ts
index bcd7f02f6..f2b2e2b93 100644
--- a/packages/web-backend/src/Videos/VideosRepo.ts
+++ b/packages/web-backend/src/Videos/VideosRepo.ts
@@ -130,7 +130,11 @@ export class VideosRepo extends Effect.Service<VideosRepo>()("VideosRepo", {
updatedAt: _updatedAt,
id: _id,
...insertData
- } = data as Record<string, unknown>;
+ } = data as CreateVideoInput & {
+ createdAt?: unknown;
+ updatedAt?: unknown;
+ id?: unknown;
+ };
const promises: MySqlInsertBase<any, any, any>[] = [
db.insert(Db.videos).values([
{