Add comments for create-post
This commit is contained in:
parent
1c5d49e41f
commit
cf36719951
|
@ -38,6 +38,8 @@ const postSchema = z.object({
|
||||||
title: z.string().min(1).max(MAX_POST_TITLE_LENGTH),
|
title: z.string().min(1).max(MAX_POST_TITLE_LENGTH),
|
||||||
content: contentSchema,
|
content: contentSchema,
|
||||||
groupId: z.string().optional(),
|
groupId: z.string().optional(),
|
||||||
|
|
||||||
|
// Date doc fields:
|
||||||
bounty: z.number().optional(),
|
bounty: z.number().optional(),
|
||||||
birthday: z.number().optional(),
|
birthday: z.number().optional(),
|
||||||
photoUrl: z.string().optional(),
|
photoUrl: z.string().optional(),
|
||||||
|
@ -62,6 +64,7 @@ export const createpost = newEndpoint({}, async (req, auth) => {
|
||||||
|
|
||||||
const postRef = firestore.collection('posts').doc()
|
const postRef = firestore.collection('posts').doc()
|
||||||
|
|
||||||
|
// If this is a date doc, create a market for it.
|
||||||
let contractSlug
|
let contractSlug
|
||||||
if (question) {
|
if (question) {
|
||||||
const closeTime = Date.now() + DAY_MS * 30 * 3
|
const closeTime = Date.now() + DAY_MS * 30 * 3
|
||||||
|
|
Loading…
Reference in New Issue
Block a user