fix: username min length + fixed condition (#982)

fixed #981 

`url.length <= 6` >>> `url.length < 6`

also removed debug message from the form component
This commit is contained in:
Lucas Smith
2024-03-02 12:43:44 +11:00
committed by GitHub
2 changed files with 1 additions and 3 deletions

View File

@@ -119,8 +119,6 @@ export const SignUpFormV2 = ({
form.formState.dirtyFields.signature &&
form.formState.errors.signature === undefined;
console.log({ formSTate: form.formState });
const { mutateAsync: signup } = trpc.auth.signup.useMutation();
const onFormSubmit = async ({ name, email, password, signature, url }: TSignUpFormV2Schema) => {

View File

@@ -25,7 +25,7 @@ export const authRouter = router({
const { name, email, password, signature, url } = input;
if ((true || IS_BILLING_ENABLED()) && url && url.length <= 6) {
if (IS_BILLING_ENABLED() && url && url.length < 6) {
throw new AppError(
AppErrorCode.PREMIUM_PROFILE_URL,
'Only subscribers can have a username shorter than 6 characters',