From 92cf9cf0131c6a2acc1ff82b095b794328812082 Mon Sep 17 00:00:00 2001 From: sora-ext Date: Wed, 13 Aug 2025 10:39:39 +0200 Subject: [PATCH] Update src/server/api.ts --- src/server/api.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/api.ts b/src/server/api.ts index 85608b2..acf0c20 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -74,6 +74,7 @@ export default function (server, opts, done) { return server.level.db.get(req.params.id).then(r=>JSON.parse(r)).then(r=>r.version||-1).catch(_=>-1).then(db_version=>{ console.log(`Received ${req.body.version}, expected ${db_version+1} (-1 if expected nothing)`) + console.log(req.body) if(db_version+1 == req.body.version || db_version == -1) return server.level.db.put(req.params.id, req.body) .then(_=>reply.send({ content: "ok" }))