fix(server): wrap read-modify-write apis with distributed lock (#6142)

This commit is contained in:
DarkSky
2024-03-19 02:16:23 +00:00
parent a4cd8d6ca3
commit f18133af82
20 changed files with 412 additions and 79 deletions

View File

@@ -1 +1,2 @@
export * from './payment-required';
export * from './too-many-requests';

View File

@@ -0,0 +1,14 @@
import { HttpException, HttpStatus } from '@nestjs/common';
export class TooManyRequestsException extends HttpException {
constructor(desc?: string, code: string = 'Too Many Requests') {
super(
HttpException.createBody(
desc ?? code,
code,
HttpStatus.TOO_MANY_REQUESTS
),
HttpStatus.TOO_MANY_REQUESTS
);
}
}