Skip to content

Commit 7e5b5ba

Browse files
author
patched.codes[bot]
committed
Patched /tmp/tmpptoa8sbv/custom/src/modules/hello/v1/module.js
1 parent 43218ee commit 7e5b5ba

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

custom/src/modules/hello/v1/module.js

+32
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ const module = {
1919
}),
2020
},
2121
},
22+
/**
23+
* Handles a request and sends a greeting response.
24+
* @param {Object} req - The request object containing query parameters.
25+
* @param {Object} res - The response object used to send the HTTP response.
26+
* @returns {Object} The response object with a 200 status code and a greeting message.
27+
*/
2228
handler: (req, res) => {
2329
return res.status(200).send({ hello: req.query.name });
2430
},
@@ -36,6 +42,12 @@ const module = {
3642
}),
3743
},
3844
},
45+
/**
46+
* Handles HTTP requests and responds with a greeting
47+
* @param {Object} req - The request object containing method, path, and params
48+
* @param {Object} res - The response object used to send the HTTP response
49+
* @returns {Object} JSON object containing a greeting with the name from the request parameters
50+
*/
3951
handler: (req, res) => {
4052
req.log.debug(`Request ${req.method.toUpperCase()} ${req.path}`);
4153

@@ -55,6 +67,14 @@ const module = {
5567
}),
5668
},
5769
},
70+
```
71+
/**
72+
* Handles an HTTP request and responds with a greeting
73+
* @param {Object} req - The request object containing information about the HTTP request
74+
* @param {Object} res - The response object used to send the HTTP response
75+
* @returns {Object} The response object with a 201 status code and a greeting message
76+
*/
77+
```
5878
handler: (req, res) => {
5979
req.log.debug(`Request ${req.method.toUpperCase()} ${req.path}`);
6080

@@ -77,6 +97,12 @@ const module = {
7797
}),
7898
},
7999
},
100+
/**
101+
* Handles a request and responds with a customized greeting and comment
102+
* @param {Object} req - The request object containing method, path, params, and body
103+
* @param {Object} res - The response object used to send the result
104+
* @returns {Object} The response object with status 200 and a JSON payload containing a greeting and comment
105+
*/
80106
handler: (req, res) => {
81107
req.log.debug(`Request ${req.method.toUpperCase()} ${req.path}`);
82108

@@ -101,6 +127,12 @@ const module = {
101127
}),
102128
},
103129
},
130+
/**
131+
* Handles HTTP requests and responds with a farewell message
132+
* @param {Object} req - The request object containing method, path, and params
133+
* @param {Object} res - The response object used to send the result
134+
* @returns {Object} The response object with status 200 and a farewell message
135+
*/
104136
handler: (req, res) => {
105137
req.log.debug(`Request ${req.method.toUpperCase()} ${req.path}`);
106138

0 commit comments

Comments
 (0)