Skip to content

Commit db8b751

Browse files
committed
Include user id in request
1 parent 6ff47c7 commit db8b751

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

web/src/app/api/v1/ads/_post.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const messageSchema = z.object({
2020
})
2121

2222
const bodySchema = z.object({
23-
messages: z.array(messageSchema).min(1),
23+
messages: z.array(messageSchema),
2424
})
2525

2626
export type GravityEnv = {
@@ -91,7 +91,10 @@ export async function postAds(params: {
9191
Authorization: `Bearer ${serverEnv.GRAVITY_API_KEY}`,
9292
'Content-Type': 'application/json',
9393
},
94-
body: JSON.stringify({ messages }),
94+
body: JSON.stringify({
95+
messages,
96+
user: { uid: userId },
97+
}),
9598
})
9699

97100
if (response.status === 204) {

0 commit comments

Comments
 (0)