fix: api hooks

This commit is contained in:
Gabe
2025-09-25 23:08:39 +08:00
parent 533a0e2d5b
commit 6b9a1a49bb
12 changed files with 523 additions and 444 deletions

View File

@@ -62,10 +62,11 @@ async function trySetObj(key, obj) {
async function getObj(key) {
const val = await get(key);
if (val === null || val === undefined) return null;
try {
return JSON.parse(val);
} catch (err) {
kissLog("parse json: ", key);
kissLog("parse json in storage err: ", key);
}
return null;
}