security fixes

This commit is contained in:
2025-10-12 00:24:27 -04:00
parent 773ea92f5d
commit dfdb3e0840
7 changed files with 14 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
import { updateUserRole, getUserByUsername } from '~/server/utils/database'
import { getAuthCookie } from '~/server/utils/auth'
import { getSessionUsername } from '~/server/utils/auth'
export default defineEventHandler(async (event) => {
const username = getAuthCookie(event)
const username = await getSessionUsername(event)
if (!username) {
throw createError({