fix: ensure consistent return type from notes.assert

For fully cached topics it returned bare tid instead of a { tid, count } object.

Typescript would fix this btw :)
This commit is contained in:
Opliko
2024-05-07 10:40:47 +02:00
parent af98675808
commit a7aeabc80d

View File

@@ -56,7 +56,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
// All cached, return early.
winston.verbose('[notes/assert] No new notes to process.');
unlock(id);
return tid;
return { tid, count: 0 };
}
let cid;