Skip to content

Commit

Permalink
Solve #2
Browse files Browse the repository at this point in the history
  • Loading branch information
koolskateguy89 committed Nov 28, 2022
1 parent 93bd76b commit 3382e62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prototype_nextjs/src/pages/api/user/change-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default async function handler(
const safeParseResult = ChangeNameSchema.safeParse(req.body);

if (!safeParseResult.success) {
res.status(200).json({
res.status(400).json({
success: false,
issues: safeParseResult.error.issues,
} as ResponseSchema);
Expand Down
2 changes: 1 addition & 1 deletion prototype_nextjs/src/pages/api/user/change-password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default async function handler(
const safeParseResult = ChangePasswordSchema.safeParse(req.body);

if (!safeParseResult.success) {
res.status(200).json({
res.status(400).json({
success: false,
issues: safeParseResult.error.issues,
} as ResponseSchema);
Expand Down
2 changes: 1 addition & 1 deletion prototype_nextjs/src/pages/api/user/signIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default async function handler(
const safeParseResult = SignInSchema.safeParse(req.body);

if (!safeParseResult.success) {
res.status(200).json({
res.status(400).json({
success: false,
reason: ErrorReason.BAD_CREDENTIALS,
issues: safeParseResult.error.issues,
Expand Down

0 comments on commit 3382e62

Please sign in to comment.