added data table, formatter
revert context on __root beforeLoad refactor project structure refactor role badge dynamic nav menu
This commit is contained in:
15
src/service/repository.ts
Normal file
15
src/service/repository.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { prisma } from '@/db';
|
||||
import { Audit } from '@/generated/prisma/client';
|
||||
|
||||
export const createAuditLog = async (data: Omit<Audit, 'id' | 'createdAt'>) => {
|
||||
try {
|
||||
await prisma.audit.create({
|
||||
data: {
|
||||
...data,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user