+1
-6
server/db.js
+1
-6
server/db.js
···
78
78
79
79
this.#stmt_delete_push_sub = db.prepare(
80
80
`delete from push_subs
81
-
where account_did = ?
82
-
and session = ?`);
81
+
where session = ?`);
83
82
84
83
this.#stmt_get_push_info = db.prepare(
85
84
`select created,
···
106
105
}
107
106
this.#stmt_insert_push_sub.run(did, session, sub);
108
107
});
109
-
}
110
-
111
-
removePushSub(did, session) {
112
-
return this.#stmt_delete_push_sub.run(did, session);
113
108
}
114
109
115
110
getSubscribedDids() {
+2
-2
server/index.js
+2
-2
server/index.js
···
288
288
const handleLogout = async (db, req, res, appSecret) => {
289
289
let info = getAccountCookie(req, res, appSecret, null, true);
290
290
if (!info) return res.writeHead(400).end(JSON.stringify({ reason: 'failed to verify cookie signature' }));
291
-
const [did, session, _isAdmin] = info;
291
+
const [_did, session, _isAdmin] = info;
292
292
try {
293
-
db.removePushSub(did, session);
293
+
db.deleteSub(session);
294
294
} catch (e) {
295
295
console.warn('failed to remove sub', e);
296
296
return res