mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
web: newsletter signup on download page
This commit is contained in:
17
web/app/api/signup/route.ts
Normal file
17
web/app/api/signup/route.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Analytics } from '@segment/analytics-node'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
|
||||
const analytics = new Analytics({ writeKey: process.env.TELEMETRY_WRITE_KEY || '<empty>' })
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const { email } = await req.json()
|
||||
|
||||
analytics.identify({
|
||||
anonymousId: uuid(),
|
||||
traits: {
|
||||
email,
|
||||
},
|
||||
})
|
||||
|
||||
return new Response(null, { status: 200 })
|
||||
}
|
||||
Reference in New Issue
Block a user