initial commit

This commit is contained in:
Madison Grubb
2026-02-10 23:32:26 -05:00
commit b7046dc0e6
133 changed files with 26080 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { deleteCookie, getCookie } from 'h3'
import { getDb } from '../../utils/db.js'
export default defineEventHandler(async (event) => {
const sid = getCookie(event, 'session_id')
if (sid) {
try {
const { run } = await getDb()
await run('DELETE FROM sessions WHERE id = ?', [sid])
}
catch {
// ignore
}
deleteCookie(event, 'session_id', { path: '/' })
}
setResponseStatus(event, 204)
return null
})