Merge pull request #63 from eReuse/bugfix/client_versions

Bugfix/client versions
This commit is contained in:
cayop 2020-10-09 11:42:37 +02:00 committed by GitHub
commit 833bf12719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import teal.marshmallow
from typing import Callable, Iterable, Tuple from typing import Callable, Iterable, Tuple
from urllib.parse import urlparse from urllib.parse import urlparse
from flask import make_response, g from flask import make_response, g
from flask.json import jsonify
from teal.resource import Resource, View from teal.resource import Resource, View
from ereuse_devicehub.resources.inventory.model import Inventory from ereuse_devicehub.resources.inventory.model import Inventory
@ -35,7 +36,10 @@ class VersionView(View):
tag_version = get_tag_version(self.resource_def.app) tag_version = get_tag_version(self.resource_def.app)
versions = {'devicehub': __version__, "ereuse_tag": "0.0.0"} versions = {'devicehub': __version__, "ereuse_tag": "0.0.0"}
versions.update(tag_version) versions.update(tag_version)
return json.dumps(versions)
ret = jsonify(versions)
ret.status_code = 200
return ret
class VersionDef(Resource): class VersionDef(Resource):