Skip to content

Commit

Permalink
fix missing field name
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhniebergall committed Dec 31, 2024
1 parent b62aca4 commit fd4e360
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ app.post('/api/auth/send-magic-link', magicLinkLimiter, async (req, res) => {
try {
// Check if user exists
const userResult = await getUserByEmail(email);
const isSignup = isSignupInRequest || userResult?.error === 'User not found'; // If user doesn't exist, we're doing a signup
const isSignup = isSignupInRequest === true || userResult?.error === 'User not found'; // If user doesn't exist, we're doing a signup
// Generate magic token
const token = generateMagicToken(email);

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/operators/UserOperator.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class UserOperator extends BaseOperator {
async sendMagicLink(email, isSignup = false) {
try {
await this.retryApiCall(
() => axios.post(`${this.baseURL}/api/auth/send-magic-link`, { email, isSignup })
() => axios.post(`${this.baseURL}/api/auth/send-magic-link`, { email, isSignupInRequest:isSignup })
);
return { success: true };
} catch (error) {
Expand Down

0 comments on commit fd4e360

Please sign in to comment.