mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
feat(captcha): add ALTCHA proof-of-work captcha experiment (#2986)
This commit is contained in:
1 parent
33a118d12a
commit
7e1b934637
69 files changed
+1848
-216
No files matched your search
@@ -2,17 +2,18 @@
|
||||
|
||||
import {APIErrorCodes} from '@fluxer/constants/src/ApiErrorCodes';
|
||||
import {BadRequestError} from '@fluxer/errors/src/domains/core/BadRequestError';
|
||||
import type {FluxerErrorData} from '@fluxer/errors/src/FluxerError';
|
||||
|
||||
export class CaptchaRequiredError extends BadRequestError {
|
||||
constructor() {
|
||||
super({code: APIErrorCodes.CAPTCHA_REQUIRED});
|
||||
constructor(data?: FluxerErrorData) {
|
||||
super({code: APIErrorCodes.CAPTCHA_REQUIRED, data});
|
||||
this.name = 'CaptchaRequiredError';
|
||||
}
|
||||
}
|
||||
|
||||
export class InvalidCaptchaError extends BadRequestError {
|
||||
constructor() {
|
||||
super({code: APIErrorCodes.INVALID_CAPTCHA});
|
||||
constructor(data?: FluxerErrorData) {
|
||||
super({code: APIErrorCodes.INVALID_CAPTCHA, data});
|
||||
this.name = 'InvalidCaptchaError';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user