feat: add notes app

This commit is contained in:
2026-10-01 19:39:20 +02:00
parent ccb8dd3d15
commit ddbb6f37b5
35 changed files with 706 additions and 52 deletions
+11
View File
@@ -0,0 +1,11 @@
const PROTECTED_PREFIXES = ['/api/diary/', '/api/notes/']
export default defineEventHandler(async (event) => {
const path = event.path.split('?')[0]!
if (!PROTECTED_PREFIXES.some(prefix => path.startsWith(prefix))) return
const session = await authSession(event)
if (!session.data.unlocked) {
throw createError({ statusCode: 401, statusMessage: 'Locked' })
}
})