Skip to content

Commit 0dcbb11

Browse files
committed
<2728> feat(general): update endpoint and make it simpler
1 parent e88e5c5 commit 0dcbb11

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

hello.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
app = Flask(__name__)
33

44
"""
5-
@api {get} /sample/{message} hello world sample request
6-
@apiName GetSample
7-
@apiParam (Url) {String} message the message to return
8-
@apiSuccess (Success_200) {String} data the hello world data
9-
@apiSuccess (Success_200) {String} output what the user entered in the url
5+
@api {get} /hello/{name} Prints "Hello {name}"
6+
@apiName HelloWorld
7+
@apiParam (Url) {String} name the name to print
8+
@apiSuccess (200) {String} message the hello {name} message
109
"""
11-
@app.route("/sample/<message>")
12-
def hello(message):
10+
@app.route("/hello/<name>")
11+
def hello(name):
1312
return jsonify(
14-
data='Hello World',
15-
output=message
13+
message='Hello ' + name
1614
)

0 commit comments

Comments
 (0)