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
Copy file name to clipboardExpand all lines: apps/web/src/app/api/registration/create/route.ts
-20
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,6 @@ export async function POST(req: Request) {
38
38
);
39
39
}
40
40
41
-
if(user.publicMetadata.registrationComplete){
42
-
console.log("already registered");
43
-
returnNextResponse.json(
44
-
{
45
-
success: false,
46
-
message: "You are already registered.",
47
-
},
48
-
{status: 400},
49
-
);
50
-
}
51
-
52
-
// TODO: Might be removable? Not sure if this is needed. In every case, the sure should have a piece of metadata that says if they are registered or not.
53
-
54
41
constlookupByUserID=awaitgetUser(user.id);
55
42
56
43
if(lookupByUserID){
@@ -129,13 +116,6 @@ export async function POST(req: Request) {
129
116
});
130
117
});
131
118
132
-
clerkClient.users.updateUser(user.id,{
133
-
publicMetadata: {
134
-
...user.publicMetadata,
135
-
registrationComplete: true,
136
-
},
137
-
});
138
-
139
119
// sendEmail({
140
120
// to: body.email,
141
121
// subject: `You are now registered for ${c.hackathonName} ${c.itteration}!`,
0 commit comments