"feat: update service implementations with new features and structural changes"

This commit is contained in:
louiscklaw
2025-06-04 02:35:14 +08:00
parent 99239c32a5
commit c2c6181332
6 changed files with 235 additions and 24 deletions

View File

@@ -16,6 +16,7 @@ import prisma from '../lib/prisma';
type CreateAppLog = {
level: number;
message: string;
metadata: Record<string, any>;
};
// type UpdateAppLog = {
@@ -31,6 +32,10 @@ async function getAppLog(appLogId: string) {
return prisma.appLog.findFirst({ where: { id: appLogId } });
}
async function createAppLog(level: number, message: string, metadata: Record<string, any>) {
return prisma.appLog.create({ data: { level, message, metadata } });
}
async function createNewAppLog(createForm: CreateAppLog) {
return prisma.appLog.create({ data: createForm });
}
@@ -48,5 +53,6 @@ export {
listAppLogs,
// updateAppLog,
deleteAppLog,
createAppLog,
createNewAppLog,
};