Update various configuration files, components, and assets; enhance notification system and API endpoints; improve documentation and styles across the application.

This commit is contained in:
Haqeem Solehan
2025-10-16 16:05:39 +08:00
commit b124ff8092
336 changed files with 94392 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import prisma from '~/server/utils/prisma'
export default defineEventHandler(async (event) => {
try {
// Check authentication
const user = event.context.user;
if (!user || !user.userID) {
return {
statusCode: 401,
body: { success: false, message: 'Unauthorized' }
}
}
const id = event.context.params.id
if (!id) {
return {
statusCode: 400,
body: { success: false, message: 'Log ID is required' }
}
}
const log = await prisma.notification_logs.findUnique({
where: { id }
})
if (!log) {
return {
statusCode: 404,
body: { success: false, message: 'Log entry not found' }
}
}
return {
statusCode: 200,
body: { success: true, data: log }
}
} catch (error) {
console.error('Error fetching log entry:', error)
return {
statusCode: 500,
body: { success: false, message: 'Failed to fetch log entry', error: error.message }
}
}
})