flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

Update quickstart.rst

Open Invincibear opened this issue 2 years ago • 0 comments

Fixes a TypeError when defining two endpoints in one routing declaration

@api.route('/hello', '/world')
class HelloWorld(Resource):
    pass

TypeError: Scaffold.route() takes 2 positional arguments but 3 were given

This works:

@api.route('/hello')
@api.route('/world')
class HelloWorld(Resource):
    pass

Invincibear avatar Apr 30 '22 22:04 Invincibear