From 3614b2d5d49798a4dc17217d83639123743a9da7 Mon Sep 17 00:00:00 2001 From: sora-ext Date: Wed, 13 Aug 2025 10:49:27 +0200 Subject: [PATCH] Update src/server/api.ts --- src/server/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api.ts b/src/server/api.ts index acf0c20..42bf586 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -76,7 +76,7 @@ export default function (server, opts, done) { 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) + return server.level.db.put(req.params.id, JSON.stringify(req.body)) .then(_=>reply.send({ content: "ok" })) .catch(_=>reply.code(500).send({ error: "Error with DB" }))