videosphere
    Preparing search index...
    • Clears a livestream's R2 thumbnail after it was uploaded to YouTube and stores the YouTube URL. Updates the document first so a failed DB write leaves the R2 object intact for retry.

      Parameters

      • userId: string

        Owner user id (R2 key prefix validation).

      • livestreamId: string

        Livestream row id.

      • thumbnailR2Key: string

        Final R2 key that was uploaded to YouTube.

      • youtubeThumbnailUrl: string

        Best available thumbnail URL returned by YouTube.

      • thumbnailUpdatedAt: string

        ISO timestamp recorded when the thumbnail was uploaded.

      Returns Promise<string>

      null on success, or an error message when persistence failed.