We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc8a71c commit 047bcfdCopy full SHA for 047bcfd
examples/with-fastify/src/api/posts/posts.controller.ts
@@ -35,6 +35,7 @@ export function postsController(
35
36
const post = user.findPost(postId)
37
if (!post) return reply.status(404).send('Post not found')
38
+
39
return post
40
}
41
)
@@ -53,6 +54,7 @@ export function postsController(
53
54
55
user.addPost(post)
56
await service.write()
57
58
59
60
examples/with-fastify/src/api/posts/posts.schema.ts
@@ -8,9 +8,7 @@ export const userIdParamsSchema = {
8
9
export const userIdAndPostIdParamsSchema = {
10
params: {
11
- userId: {
12
- $ref: 'User#/properties/userId'
13
- },
+ ...userIdParamsSchema.params,
14
postId: {
15
$ref: 'Post#/properties/postId'
16
0 commit comments