Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
f2044b58
Commit
f2044b58
authored
Jul 19, 2023
by
Jeffrey Morgan
Browse files
web: fix newsletter signup
parent
d53988f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
web/app/api/signup/route.ts
web/app/api/signup/route.ts
+12
-2
No files found.
web/app/api/signup/route.ts
View file @
f2044b58
...
@@ -6,12 +6,22 @@ const analytics = new Analytics({ writeKey: process.env.TELEMETRY_WRITE_KEY || '
...
@@ -6,12 +6,22 @@ const analytics = new Analytics({ writeKey: process.env.TELEMETRY_WRITE_KEY || '
export
async
function
POST
(
req
:
Request
)
{
export
async
function
POST
(
req
:
Request
)
{
const
{
email
}
=
await
req
.
json
()
const
{
email
}
=
await
req
.
json
()
analytics
.
identify
({
const
id
=
uuid
()
anonymousId
:
uuid
(),
await
analytics
.
identify
({
anonymousId
:
id
,
traits
:
{
traits
:
{
email
,
email
,
},
},
})
})
await
analytics
.
track
({
anonymousId
:
id
,
event
:
'
signup
'
,
properties
:
{
email
,
},
})
return
new
Response
(
null
,
{
status
:
200
})
return
new
Response
(
null
,
{
status
:
200
})
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment