Skip to content

Commit

Permalink
Merge pull request #43 from ethanniser/auth-text
Browse files Browse the repository at this point in the history
update message text in signup action
  • Loading branch information
ethanniser authored Oct 21, 2024
2 parents 8db43e4 + da7b0d8 commit 0557b91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/(login)/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const signUp = validatedAction(authSchema, async (data) => {
.limit(1);

if (existingUser.length > 0) {
return { error: "Failed to create user. Please try again." };
return { error: "Username already taken. Please try again." };
}

const passwordHash = await hashPassword(password);
Expand Down Expand Up @@ -74,7 +74,7 @@ export const signIn = validatedAction(authSchema, async (data) => {
.limit(1);

if (user.length === 0) {
return { error: "Invalid email or password. Please try again." };
return { error: "Invalid username or password. Please try again." };
}

const { user: foundUser } = user[0];
Expand All @@ -85,7 +85,7 @@ export const signIn = validatedAction(authSchema, async (data) => {
);

if (!isPasswordValid) {
return { error: "Invalid email or password. Please try again." };
return { error: "Invalid username or password. Please try again." };
}
await setSession(foundUser);
});
Expand Down

0 comments on commit 0557b91

Please sign in to comment.