mirror of
https://github.com/documenso/documenso.git
synced 2026-07-14 23:07:13 +10:00
fix: nitpicks
This commit is contained in:
@@ -165,16 +165,7 @@ export const syncMemberCountWithStripeSeatPlan = async (
|
||||
/**
|
||||
* Reconciles the Stripe seat quantity and organisation claim with the actual
|
||||
* member count at the start of a new billing period.
|
||||
*
|
||||
* Called from the `customer.subscription.updated` webhook when the billing
|
||||
* period advances. The renewal invoice has already been generated at the
|
||||
* previous (high-water) quantity by then — the reconciled count takes effect
|
||||
* on the next invoice (accepted trade-off: removed seats bill for exactly
|
||||
* one extra period).
|
||||
*
|
||||
* Runs with no prorations in either direction: no credits when shrinking,
|
||||
* no retroactive charges when healing upward drift (e.g. unbilled SSO
|
||||
* portal joins or lost grow races).
|
||||
|
||||
*/
|
||||
export const reconcileSeatsWithMemberCount = async (organisationId: string) => {
|
||||
const organisation = await prisma.organisation.findUnique({
|
||||
|
||||
@@ -36,7 +36,6 @@ export const genericErrorCodeToTrpcErrorCodeMap: Record<string, { code: string;
|
||||
[AppErrorCode.INVALID_BODY]: { code: 'BAD_REQUEST', status: 400 },
|
||||
[AppErrorCode.INVALID_REQUEST]: { code: 'BAD_REQUEST', status: 400 },
|
||||
[AppErrorCode.INVALID_CAPTCHA]: { code: 'BAD_REQUEST', status: 400 },
|
||||
[AppErrorCode.LIMIT_EXCEEDED]: { code: 'TOO_MANY_REQUESTS', status: 429 },
|
||||
[AppErrorCode.NOT_FOUND]: { code: 'NOT_FOUND', status: 404 },
|
||||
[AppErrorCode.NOT_IMPLEMENTED]: { code: 'INTERNAL_SERVER_ERROR', status: 501 },
|
||||
[AppErrorCode.NOT_SETUP]: { code: 'BAD_REQUEST', status: 400 },
|
||||
|
||||
Reference in New Issue
Block a user