Skip to content

Commit

Permalink
password status
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Nov 28, 2023
1 parent 81ea351 commit 54965ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/client/pages/settings/password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function PasswordChange({ children }) {
const [check, setCheck] = useState("");

const postData = async () => {
if (check === password && password.length > 0) {
if (check === password && password.length > 2) {
await fetch(
`${process.env.NEXT_PUBLIC_API_URL}/api/v1/auth/reset-password`,
{
Expand All @@ -26,7 +26,7 @@ export default function PasswordChange({ children }) {
)
.then((res) => res.json())
.then((res) => {
if (res.failed === false) {
if (res.success) {
notifications.show({
title: "Success",
message: `Password updated :)`,
Expand All @@ -36,7 +36,7 @@ export default function PasswordChange({ children }) {
} else {
notifications.show({
title: "Error",
message: `Error: ${res.message}`,
message: `Error: Failed to update password`,
color: "red",
autoClose: 5000,
});
Expand Down

0 comments on commit 54965ea

Please sign in to comment.