Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Tests: /api/data/rev answers the write id too
Duarte Santos16fcf6484854
diff --git a/api/test/server-bad-input.test.js b/api/test/server-bad-input.test.jsindex c2898d27e..4e147a847 100644--- a/api/test/server-bad-input.test.js+++ b/api/test/server-bad-input.test.js@@ -144,7 +144,7 @@ test('PUT /api/data: an array is not a document, and null entries never reach thassert.equal(onDisk()._rev, 1);assert.deepEqual(onDisk().workouts.map(w => w.id), ['w1']);r = await status(h, 'GET', '/api/data/rev', authed);- assert.deepEqual(r.body, { rev: 1 });+ assert.deepEqual(r.body, { rev: 1, wid: onDisk()._wid });// Null and other non-object entries are dropped: every server-side reader of the document// (reminder tick, admin drill-down) dereferences the entries, and a 400 would strand a client@@ -174,7 +174,7 @@ test('PUT /api/data: a document nested too deep to store is a 400, not a 500, anassert.equal(r.body.error, 'invalid state');assert.equal(onDisk()._rev, 1);r = await status(h, 'GET', '/api/data/rev', authed);- assert.deepEqual(r.body, { rev: 1 });+ assert.deepEqual(r.body, { rev: 1, wid: onDisk()._wid });assert.equal(h.stackFrames(), 0, `stack traces in the log:\n${h.log}`);});