App version management.

* DB migration adds app_versions table for managing known app versions.
* /ping reads app version from User-Agent header and responds with latest version if the app is OKO and its version is older than the latest one stored.
* Added endpoint /app-versions which
  * lists all known versions via GET
  * adds/updates a version via POST

#3
Fix #4
This commit is contained in:
zegkljan
2022-09-23 00:59:20 +02:00
parent c9377b04fc
commit 7c8a430f49
7 changed files with 187 additions and 42 deletions
+4
View File
@@ -0,0 +1,4 @@
CREATE TABLE app_versions (
version text NOT NULL PRIMARY KEY,
address text NOT NULL
);