Skip to content

Commit

Permalink
chg: [API] Added alias for /api/vulnerability/last/<int:number>.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Dec 5, 2024
1 parent 2559d30 commit 5314a66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/web/api/v1/vulnerability.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ def post(self) -> Tuple[Dict[Any, Any], int]:
@vulnerability_ns.route("/last/<string:source>")
@vulnerability_ns.route("/last/<string:source>/<int:number>")
@vulnerability_ns.doc(description="Get the last vulnerabilities")
@legacy_ns.route(
"last", doc=False
) # Alias for /api/vulnerability/last
@legacy_ns.route(
"last/<int:number>", doc=False
) # Alias for /api/vulnerability/last/<int:number>
@vulnerability_ns.route(
"/last",
doc={
Expand Down

0 comments on commit 5314a66

Please sign in to comment.