0
@app.route(["/api/user/creationdate", "/api/user/createdat", "/api/user/createddate"])
def cd(user):
  ... code here

The above code doesnt return any errors and doesnt work for me. Is there a way to assign multiple routes to one function?

Edit (how to do this)

@app.route("/route1")
@app.route("/route2")
@app.route("/route3")
def cd():
  ... code here

doing this will have all of the routes above trigger the function cd()

ksiscool
  • 1
  • 3
  • Yes, try the solution proposed [here](https://stackoverflow.com/q/14023664/15368978). Basically, you want to define a decorator for each url you want for that route. – Patrick Yoder May 02 '22 at 14:51
  • i had no idea that i needed multiple app route decorators, thats pretty odd. thank you – ksiscool May 02 '22 at 14:54
  • got it, just edited with the answer for anyone else that needs to know, thanks patrick – ksiscool May 02 '22 at 14:56

0 Answers0