Add comments for create-post

This commit is contained in:
James Grugett 2022-09-27 17:59:36 -04:00
parent 1c5d49e41f
commit cf36719951

View File

@ -38,6 +38,8 @@ const postSchema = z.object({
title: z.string().min(1).max(MAX_POST_TITLE_LENGTH),
content: contentSchema,
groupId: z.string().optional(),
// Date doc fields:
bounty: z.number().optional(),
birthday: z.number().optional(),
photoUrl: z.string().optional(),
@ -62,6 +64,7 @@ export const createpost = newEndpoint({}, async (req, auth) => {
const postRef = firestore.collection('posts').doc()
// If this is a date doc, create a market for it.
let contractSlug
if (question) {
const closeTime = Date.now() + DAY_MS * 30 * 3