Open ldanilek opened 3 weeks ago
When I log in with an email, not with Google, I do not have a first name, so the webhook throws this error:
which is because of the exclamation point on this line: https://github.com/adrianhajdin/podcastr/blob/e4b647350223c45e2ebee356112158545d61473e/convex/http.ts#L23
The exclamation point hides the fact that the user's first_name can be null.
first_name
Two possible fixes:
name: event.data.first_name ?? "",
v.string()
v.union(v.string(), v.null())
name
createUser
users
author
podcasts
When I log in with an email, not with Google, I do not have a first name, so the webhook throws this error:
which is because of the exclamation point on this line: https://github.com/adrianhajdin/podcastr/blob/e4b647350223c45e2ebee356112158545d61473e/convex/http.ts#L23
The exclamation point hides the fact that the user's
first_name
can be null.Two possible fixes:
name: event.data.first_name ?? "",
v.string()
intov.union(v.string(), v.null())
in three places:name
increateUser
args andname
inusers
schema andauthor
inpodcasts
schema.