Skip to content

Commit c2100e7

Browse files
committed
Add request path and parameters to response object in Fastify server
- Enhanced the response object in the Fastify server to include the request path and parameters for better debugging and logging. - Removed the redundant URL from the response structure to streamline the data returned.
1 parent 1d15f05 commit c2100e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,13 @@ const server = Fastify({
132132
return {
133133
method: request.method,
134134
url: request.url,
135+
path: request.url,
136+
parameters: request.params,
135137
};
136138
},
137139
res(reply) {
138140
return {
139141
statusCode: reply.statusCode,
140-
url: reply.request?.url,
141142
};
142143
},
143144
},

0 commit comments

Comments
 (0)