feat: add the admin page

This commit is contained in:
Catalin Pit
2023-09-08 11:28:50 +03:00
parent 171a5ba4ee
commit 67571158e8
6 changed files with 175 additions and 2 deletions

View File

@ -0,0 +1,18 @@
import { prisma } from '@documenso/prisma';
import { SubscriptionStatus } from '@documenso/prisma/client';
export const getUsersCount = async () => {
return await prisma.user.count();
};
export const getUsersWithSubscriptionsCount = async () => {
return await prisma.user.count({
where: {
Subscription: {
some: {
status: SubscriptionStatus.ACTIVE,
},
},
},
});
};