mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(api): mask Tor blocks as administrator IP bans (#2023)
This commit is contained in:
@@ -159,8 +159,6 @@ export const APIErrorCodes = {
|
||||
GLOBAL_IP_BANNED: 'GLOBAL_IP_BANNED',
|
||||
GLOBAL_IP_TEMPORARILY_BANNED: 'GLOBAL_IP_TEMPORARILY_BANNED',
|
||||
IP_BANNED: 'IP_BANNED',
|
||||
RESIDENTIAL_PROXY_BLOCKED: 'RESIDENTIAL_PROXY_BLOCKED',
|
||||
TOR_BLOCKED: 'TOR_BLOCKED',
|
||||
MAX_ANIMATED_EMOJIS: 'MAX_ANIMATED_EMOJIS',
|
||||
MAX_APPLICATIONS: 'MAX_APPLICATIONS',
|
||||
MAX_BOOKMARKS: 'MAX_BOOKMARKS',
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {APIErrorCodes} from '@fluxer/constants/src/ApiErrorCodes';
|
||||
import {ForbiddenError} from '@fluxer/errors/src/domains/core/ForbiddenError';
|
||||
|
||||
export class TorBlockedError extends ForbiddenError {
|
||||
constructor() {
|
||||
super({code: APIErrorCodes.TOR_BLOCKED});
|
||||
}
|
||||
}
|
||||
@@ -208,8 +208,6 @@ export const ErrorCodeToI18nKey = {
|
||||
[APIErrorCodes.GLOBAL_IP_BANNED]: 'permissions.global_ip_banned',
|
||||
[APIErrorCodes.GLOBAL_IP_TEMPORARILY_BANNED]: 'permissions.global_ip_temporarily_banned',
|
||||
[APIErrorCodes.IP_BANNED]: 'permissions.global_ip_banned',
|
||||
[APIErrorCodes.RESIDENTIAL_PROXY_BLOCKED]: 'permissions.user_ip_banned_from_guild',
|
||||
[APIErrorCodes.TOR_BLOCKED]: 'permissions.user_ip_banned_from_guild',
|
||||
[APIErrorCodes.MAX_ANIMATED_EMOJIS]: 'invites_and_packs.max_animated_emojis_reached',
|
||||
[APIErrorCodes.MAX_APPLICATIONS]: 'misc_limits.max_applications_reached',
|
||||
[APIErrorCodes.MAX_BOOKMARKS]: 'misc_limits.max_bookmarks_reached',
|
||||
|
||||
Reference in New Issue
Block a user