mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Drop unused endpoint POST /version on compute
This commit is contained in:
2 files changed
-41
No files matched your search
@@ -33,17 +33,3 @@ class VersionHandler:
|
||||
config = Config.instance()
|
||||
local_server = config.get_section_config("Server").getboolean("local", False)
|
||||
response.json({"version": __version__, "local": local_server})
|
||||
|
||||
@Route.post(
|
||||
r"/version",
|
||||
description="Check if version is the same as the server",
|
||||
output=VERSION_SCHEMA,
|
||||
input=VERSION_SCHEMA,
|
||||
status_codes={
|
||||
200: "Same version",
|
||||
409: "Invalid version"
|
||||
})
|
||||
def check_version(request, response):
|
||||
if request.json["version"] != __version__:
|
||||
raise HTTPConflict(text="Client version {} differs with server version {}".format(request.json["version"], __version__))
|
||||
response.json({"version": __version__})
|
||||
Reference in new issue
Block a user