mirror of
https://git.wownero.com/wownero/wownero-funding-system.git
synced 2024-08-15 00:53:45 +00:00
Merge pull request #16 from skftn/wowlight_version_check
wowlight version check API route
This commit is contained in:
commit
1d2fe54b9a
1 changed files with 21 additions and 0 deletions
|
@ -64,3 +64,24 @@ def api_qr_generate(address):
|
|||
raise Exception('Could not create QR code')
|
||||
|
||||
return send_from_directory('static/qr', '%s.png' % address)
|
||||
|
||||
|
||||
@app.route('/api/1/wowlight')
|
||||
@endpoint.api(
|
||||
parameter('version', type=str, location='args', required=True)
|
||||
)
|
||||
def api_wowlight_version_check(version):
|
||||
"""
|
||||
Checks incoming wowlight wallet version, returns False when the version is
|
||||
too old and needs to be upgraded (due to hard-forks)
|
||||
:param version:
|
||||
:return: bool
|
||||
"""
|
||||
versions = {
|
||||
'0.1.0': True
|
||||
}
|
||||
|
||||
if version not in versions:
|
||||
return False
|
||||
|
||||
return versions[version]
|
||||
|
|
Loading…
Reference in a new issue