mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-24 03:36:42 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -1,22 +1,22 @@
|
|||
import { HttpException, HttpStatus } from '@nestjs/common';
|
||||
|
||||
export interface InsufficientCreditsDetails {
|
||||
requiredCredits: number;
|
||||
availableCredits: number;
|
||||
creditType: 'user' | 'app';
|
||||
operation: string;
|
||||
requiredCredits: number;
|
||||
availableCredits: number;
|
||||
creditType: 'user' | 'app';
|
||||
operation: string;
|
||||
}
|
||||
|
||||
export class InsufficientCreditsException extends HttpException {
|
||||
constructor(details: InsufficientCreditsDetails) {
|
||||
super(
|
||||
{
|
||||
statusCode: HttpStatus.PAYMENT_REQUIRED,
|
||||
error: 'Insufficient Credits',
|
||||
message: `Not enough credits for ${details.operation}. Required: ${details.requiredCredits}, Available: ${details.availableCredits}`,
|
||||
details,
|
||||
},
|
||||
HttpStatus.PAYMENT_REQUIRED,
|
||||
);
|
||||
}
|
||||
constructor(details: InsufficientCreditsDetails) {
|
||||
super(
|
||||
{
|
||||
statusCode: HttpStatus.PAYMENT_REQUIRED,
|
||||
error: 'Insufficient Credits',
|
||||
message: `Not enough credits for ${details.operation}. Required: ${details.requiredCredits}, Available: ${details.availableCredits}`,
|
||||
details,
|
||||
},
|
||||
HttpStatus.PAYMENT_REQUIRED
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue