@@ -4,11 +4,15 @@ import { db } from "@cap/database";
44import { getCurrentUser } from "@cap/database/auth/session" ;
55import { encrypt , hashPassword , verifyPassword } from "@cap/database/crypto" ;
66import { videos } from "@cap/database/schema" ;
7+ import type { Video } from "@cap/web-domain" ;
78import { eq } from "drizzle-orm" ;
89import { revalidatePath } from "next/cache" ;
910import { cookies } from "next/headers" ;
1011
11- export async function setVideoPassword ( videoId : string , password : string ) {
12+ export async function setVideoPassword (
13+ videoId : Video . VideoId ,
14+ password : string ,
15+ ) {
1216 try {
1317 const user = await getCurrentUser ( ) ;
1418
@@ -42,7 +46,7 @@ export async function setVideoPassword(videoId: string, password: string) {
4246 }
4347}
4448
45- export async function removeVideoPassword ( videoId : string ) {
49+ export async function removeVideoPassword ( videoId : Video . VideoId ) {
4650 try {
4751 const user = await getCurrentUser ( ) ;
4852
@@ -75,7 +79,10 @@ export async function removeVideoPassword(videoId: string) {
7579 }
7680}
7781
78- export async function verifyVideoPassword ( videoId : string , password : string ) {
82+ export async function verifyVideoPassword (
83+ videoId : Video . VideoId ,
84+ password : string ,
85+ ) {
7986 try {
8087 if ( ! videoId || typeof password !== "string" )
8188 throw new Error ( "Missing data" ) ;
0 commit comments