You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnres.status(400).json({error: "A valid @dartmouth.edu email is required"});
331
+
}
332
+
333
+
constdartmouthUser=awaitprisma.user.findUnique({
334
+
where: { dartmouthEmail },
335
+
include: {member: true},
311
336
});
312
337
313
-
if(!member)returnres.status(404).json({error: "No DALI profile found for your email address"});
314
-
if(member.userId!==null)returnres.status(409).json({error: "This DALI profile is already linked to another account"});
338
+
if(!dartmouthUser)returnres.status(404).json({error: "No account found for that Dartmouth email. Make sure you have signed in with it at least once."});
339
+
if(dartmouthUser.member)returnres.status(409).json({error: "That Dartmouth account is already linked to a DALI profile"});
315
340
341
+
// Point Member.userId to the Dartmouth User so their login shows isMember=true
0 commit comments