mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 18:21:32 +10:00
feat: migrate templates and documents to envelope model
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { DocumentSource, SubscriptionStatus } from '@prisma/client';
|
||||
import { DocumentSource, EnvelopeType, SubscriptionStatus } from '@prisma/client';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import { IS_BILLING_ENABLED } from '@documenso/lib/constants/app';
|
||||
@ -84,8 +84,9 @@ export const getServerLimits = async ({
|
||||
}
|
||||
|
||||
const [documents, directTemplates] = await Promise.all([
|
||||
prisma.document.count({
|
||||
prisma.envelope.count({
|
||||
where: {
|
||||
type: EnvelopeType.DOCUMENT,
|
||||
team: {
|
||||
organisationId: organisation.id,
|
||||
},
|
||||
@ -97,8 +98,9 @@ export const getServerLimits = async ({
|
||||
},
|
||||
},
|
||||
}),
|
||||
prisma.template.count({
|
||||
prisma.envelope.count({
|
||||
where: {
|
||||
type: EnvelopeType.TEMPLATE,
|
||||
team: {
|
||||
organisationId: organisation.id,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user