mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 10:35:35 +01:00
Fixed route validation.
This commit is contained in:
parent
88043ee916
commit
5c2cb97070
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ export async function POST(request: Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const schema = z.object({
|
const schema = z.object({
|
||||||
type: z.enum(['event', 'identity']),
|
type: z.enum(['event', 'identify']),
|
||||||
payload: z.object({
|
payload: z.object({
|
||||||
website: z.string().uuid(),
|
website: z.string().uuid(),
|
||||||
data: z.object({}).passthrough().optional(),
|
data: z.object({}).passthrough().optional(),
|
||||||
|
|
@ -189,5 +189,5 @@ export async function POST(request: Request) {
|
||||||
|
|
||||||
const token = createToken({ websiteId, sessionId, visitId, iat }, secret());
|
const token = createToken({ websiteId, sessionId, visitId, iat }, secret());
|
||||||
|
|
||||||
return json({ cache: token });
|
return json({ cache: token, websiteId, sessionId, visitId, iat });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue