Generated videos save into a chosen folder, sensitive clips skip thumbnails until played, and Docker writes the catalog to a Coolify volume. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
493 B
TypeScript
13 lines
493 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
const body = await readBody<{ password?: string }>(event)
|
|
const password = String(body?.password || '')
|
|
if (!password) {
|
|
throw createError({ statusCode: 400, statusMessage: 'Password is required' })
|
|
}
|
|
if (!(await verifyLibraryPassword(password))) {
|
|
throw createError({ statusCode: 401, statusMessage: 'Incorrect library password' })
|
|
}
|
|
setLibraryUnlock(event, currentPasswordVersion())
|
|
return publicLibrary(event)
|
|
})
|