Signed in, the server's profile is the truth: sign-in and pairing adopt it and ask once about workouts logged while signed out (Add them / Keep profile as is); the app polls the revision every 30 s and on every resume (GET /api/data/rev) and fetches only what moved; offline and unsynced states show a banner, retry on reconnect and confirm with a toast; pagehide flushes a pending change
This commit is contained in:
1 parent
28a068b8f0
commit
826432a3a2
30 files changed
+541
-37
No files matched your search
@@ -566,6 +566,25 @@ paths:
|
||||
invalid: { value: { error: "invalid state" } }
|
||||
'401': { $ref: '#/components/responses/Unauthorized' }
|
||||
|
||||
/api/data/rev:
|
||||
get:
|
||||
tags: [Data]
|
||||
summary: Current revision of the caller's profile state
|
||||
description: |
|
||||
The `rev` that `GET /api/data` would return, without the document. Signed-in clients poll
|
||||
this while open and on every return to the foreground and fetch the document only when
|
||||
the number changed.
|
||||
responses:
|
||||
'200':
|
||||
description: The current revision (0 when the profile has no state yet).
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
rev: { type: integer }
|
||||
'401': { $ref: '#/components/responses/Unauthorized' }
|
||||
|
||||
/api/push/public-key:
|
||||
get:
|
||||
tags: [push]
|
||||
|
||||
Reference in new issue
Block a user