mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
show more user-friendly messages when some features are disabled
This commit is contained in:
@@ -29,8 +29,74 @@ export interface SpecifiedApiError {
|
||||
}
|
||||
|
||||
export const SPECIFIED_API_NOT_FOUND_ERRORS: Record<string, SpecifiedApiError> = {
|
||||
'/api/authorize.json': {
|
||||
message: 'Username/password login is disabled'
|
||||
},
|
||||
'/api/register.json': {
|
||||
message: 'User registration is disabled'
|
||||
},
|
||||
'/api/2fa/authorize.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/2fa/recovery.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/verify_email/resend.json': {
|
||||
message: 'Email verification is disabled'
|
||||
},
|
||||
'/api/verify_email/by_token.json': {
|
||||
message: 'Email verification is disabled'
|
||||
},
|
||||
'/api/forget_password/request.json': {
|
||||
message: 'Forget password is disabled'
|
||||
},
|
||||
'/api/forget_password/reset/by_token.json': {
|
||||
message: 'Forget password is disabled'
|
||||
},
|
||||
'/api/v1/users/verify_email/resend.json': {
|
||||
message: 'Email verification is disabled'
|
||||
},
|
||||
'/api/v1/users/external_auth/list.json': {
|
||||
message: 'External login is disabled'
|
||||
},
|
||||
'/api/v1/users/external_auth/unlink.json': {
|
||||
message: 'External login is disabled'
|
||||
},
|
||||
'/api/v1/users/2fa/status.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/v1/users/2fa/enable/request.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/v1/users/2fa/enable/confirm.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/v1/users/2fa/disable.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/v1/users/2fa/recovery/regenerate.json': {
|
||||
message: 'Two-factor authentication is disabled'
|
||||
},
|
||||
'/api/v1/transactions/parse_dsv_file.json': {
|
||||
message: 'Transaction importing is disabled'
|
||||
},
|
||||
'/api/v1/transactions/parse_import.json': {
|
||||
message: 'Transaction importing is disabled'
|
||||
},
|
||||
'/api/v1/transactions/import.json': {
|
||||
message: 'Transaction importing is disabled'
|
||||
},
|
||||
'/api/v1/transactions/import/process.json': {
|
||||
message: 'Transaction importing is disabled'
|
||||
},
|
||||
'/api/v1/transaction/pictures/upload.json': {
|
||||
message: 'Transaction picture is disabled'
|
||||
},
|
||||
'/api/v1/transaction/pictures/remove_unused.json': {
|
||||
message: 'Transaction picture is disabled'
|
||||
},
|
||||
'/api/v1/llm/transactions/recognize_receipt_image.json': {
|
||||
message: 'AI image recognition is disabled'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user