Formated Files

This commit is contained in:
Ahmad 2024-02-15 20:49:19 -05:00
parent d5631b309a
commit e768d9181f
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
138 changed files with 1829 additions and 1851 deletions

View file

@ -1,7 +1,7 @@
import { auth, currentUser } from "@clerk/nextjs";
import { ACTION, ENTITY_TYPE } from "@prisma/client";
import { auth, currentUser } from '@clerk/nextjs';
import { ACTION, ENTITY_TYPE } from '@prisma/client';
import { db } from "@/lib/db";
import { db } from '@/lib/db';
interface Props {
entityId: string;
@ -15,7 +15,7 @@ export const createAuditLog = async (props: Props) => {
const { orgId } = auth();
const user = await currentUser();
if (!orgId || !user) throw new Error("User not found");
if (!orgId || !user) throw new Error('User not found');
const { entityId, entityType, entityTitle, action } = props;
@ -28,10 +28,10 @@ export const createAuditLog = async (props: Props) => {
action,
userId: user.id,
userImage: user?.imageUrl,
userName: user?.firstName + " " + user?.lastName,
userName: user?.firstName + ' ' + user?.lastName,
},
});
} catch (error) {
console.error("[AUDIT_LOG_ERROR]", error);
console.error('[AUDIT_LOG_ERROR]', error);
}
};