jbilcke-hf HF staff commited on
Commit
478b897
·
1 Parent(s): 7e9affd
Files changed (1) hide show
  1. src/index.mts +2 -0
src/index.mts CHANGED
@@ -94,6 +94,7 @@ app.post("/post", async (req, res) => {
94
 
95
  try {
96
  await savePost(post)
 
97
  } catch (err) {
98
  console.error(`failed to save the post: ${err}`)
99
  res.status(400)
@@ -122,6 +123,7 @@ app.get("/posts/:appId", async (req, res) => {
122
  try {
123
  const posts = await getAppPosts(appId)
124
  res.status(200)
 
125
  res.write(JSON.stringify({ posts } as GetAppPostsResponse))
126
  res.end()
127
  return
 
94
 
95
  try {
96
  await savePost(post)
97
+ console.log(`saved post:`, post)
98
  } catch (err) {
99
  console.error(`failed to save the post: ${err}`)
100
  res.status(400)
 
123
  try {
124
  const posts = await getAppPosts(appId)
125
  res.status(200)
126
+ console.log(`returning ${posts.length} community posts for app ${appId}`)
127
  res.write(JSON.stringify({ posts } as GetAppPostsResponse))
128
  res.end()
129
  return