This commit is contained in:
badukwei
2024-05-17 13:47:09 +08:00
parent da0be5e884
commit 2089b035c4
2 changed files with 1 additions and 7 deletions

View File

@@ -108,7 +108,3 @@ const PostDetails: React.FC = () => {
}
export default PostDetails
function fetchPostById(id: string) {
throw new Error('Function not implemented.')
}

View File

@@ -28,9 +28,7 @@ export async function fetchCommentsByPostId(
if (!postId) return []
const queryParams = new URLSearchParams()
queryParams.append('postId', postId)
const res = await fetch(
`${SERVER}/api/comment?${queryParams.toString()}`,
)
const res = await fetch(`${SERVER}/api/comment?${queryParams.toString()}`)
return await res.json()
}