finalized administration panel

This commit is contained in:
daniel31x13
2024-05-03 10:22:45 -04:00
parent 08c2ff278f
commit 915d08a315
6 changed files with 245 additions and 34 deletions
@@ -11,7 +11,7 @@ const authentikEnabled = process.env.AUTHENTIK_CLIENT_SECRET;
export default async function deleteUserById(
userId: number,
body: DeleteUserBody,
isServerAdmin: boolean
isServerAdmin?: boolean
) {
// First, we retrieve the user from the database
const user = await prisma.user.findUnique({
@@ -93,6 +93,7 @@ export default async function deleteUserById(
await prisma.subscription.delete({
where: { userId },
});
// .catch((err) => console.log(err));
await prisma.usersAndCollections.deleteMany({
where: {