Added impersonation for admins

This commit is contained in:
Tom
2024-01-04 21:57:32 +00:00
parent 320c826684
commit 8f7f18e069
25 changed files with 494 additions and 131 deletions

10
data/impersonation.ts Normal file
View File

@ -0,0 +1,10 @@
import { db } from "@/lib/db";
export const getImpersonationById = async (id: string) => {
try {
const impersonation = await db.impersonation.findUnique({ where: { sourceId: id }})
return impersonation;
} catch {
return null;
}
}