mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-15 22:08:17 +00:00
API V2
This commit is contained in:
@ -120,7 +120,7 @@ class Route(object):
|
||||
# This block is executed only the first time
|
||||
output_schema = kw.get("output", {})
|
||||
input_schema = kw.get("input", {})
|
||||
api_version = kw.get("api_version", 1)
|
||||
api_version = kw.get("api_version", 2)
|
||||
raw = kw.get("raw", False)
|
||||
|
||||
def register(func):
|
||||
@ -129,8 +129,6 @@ class Route(object):
|
||||
route = "/v{version}/controller{path}".format(path=path, version=api_version)
|
||||
elif "hypervisor" in func.__module__:
|
||||
route = "/v{version}/hypervisor{path}".format(path=path, version=api_version)
|
||||
elif "handlers.api" in func.__module__:
|
||||
route = "/v{version}{path}".format(path=path, version=api_version)
|
||||
else:
|
||||
route = path
|
||||
|
||||
|
Reference in New Issue
Block a user