We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ff47c7 commit db8b751Copy full SHA for db8b751
web/src/app/api/v1/ads/_post.ts
@@ -20,7 +20,7 @@ const messageSchema = z.object({
20
})
21
22
const bodySchema = z.object({
23
- messages: z.array(messageSchema).min(1),
+ messages: z.array(messageSchema),
24
25
26
export type GravityEnv = {
@@ -91,7 +91,10 @@ export async function postAds(params: {
91
Authorization: `Bearer ${serverEnv.GRAVITY_API_KEY}`,
92
'Content-Type': 'application/json',
93
},
94
- body: JSON.stringify({ messages }),
+ body: JSON.stringify({
95
+ messages,
96
+ user: { uid: userId },
97
+ }),
98
99
100
if (response.status === 204) {
0 commit comments