mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-14 23:47:55 +00:00
Update privacy policy, code review
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
"login_title": "Sign in to your ntfy account",
|
||||
"login_form_button_submit": "Sign in",
|
||||
"login_link_signup": "Sign up",
|
||||
"login_link_forgot_password": "Forgot password?",
|
||||
"login_link_forgot_password": "Forgot password",
|
||||
"reset_password_request_title": "Reset password",
|
||||
"reset_password_request_description": "Enter your username or email address. If an account exists, a link to reset your password will be emailed. This only works if you already added a primary email address and verified it.",
|
||||
"reset_password_request_identifier_label": "Username or email",
|
||||
|
||||
@@ -31,11 +31,11 @@ export class TopicReservedError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
export class AccountCreateLimitReachedError extends Error {
|
||||
static CODE = 42906; // errHTTPTooManyRequestsLimitAccountCreation
|
||||
export class AccountActionLimitReachedError extends Error {
|
||||
static CODE = 42906; // errHTTPTooManyRequestsLimitAccountActions
|
||||
|
||||
constructor() {
|
||||
super("Account creation limit reached");
|
||||
super("Account action limit reached");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ export const throwAppError = async (response) => {
|
||||
throw new UserExistsError();
|
||||
} else if (error.code === TopicReservedError.CODE) {
|
||||
throw new TopicReservedError();
|
||||
} else if (error.code === AccountCreateLimitReachedError.CODE) {
|
||||
throw new AccountCreateLimitReachedError();
|
||||
} else if (error.code === AccountActionLimitReachedError.CODE) {
|
||||
throw new AccountActionLimitReachedError();
|
||||
} else if (error.code === IncorrectPasswordError.CODE) {
|
||||
throw new IncorrectPasswordError();
|
||||
} else if (error.code === EmailVerificationCodeInvalidError.CODE) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import accountApi from "../app/AccountApi";
|
||||
import AvatarBox from "./AvatarBox";
|
||||
import session from "../app/Session";
|
||||
import routes from "./routes";
|
||||
import { AccountCreateLimitReachedError, UserExistsError } from "../app/errors";
|
||||
import { AccountActionLimitReachedError, UserExistsError } from "../app/errors";
|
||||
|
||||
const Signup = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -34,7 +34,7 @@ const Signup = () => {
|
||||
console.log(`[Signup] Signup for user ${user.username} failed`, e);
|
||||
if (e instanceof UserExistsError) {
|
||||
setError(t("signup_error_username_taken", { username: e.username }));
|
||||
} else if (e instanceof AccountCreateLimitReachedError) {
|
||||
} else if (e instanceof AccountActionLimitReachedError) {
|
||||
setError(t("signup_error_creation_limit_reached"));
|
||||
} else {
|
||||
setError(e.message);
|
||||
|
||||
Reference in New Issue
Block a user