mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
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:
@@ -56,7 +56,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
|||||||
// All cached, return early.
|
// All cached, return early.
|
||||||
winston.verbose('[notes/assert] No new notes to process.');
|
winston.verbose('[notes/assert] No new notes to process.');
|
||||||
unlock(id);
|
unlock(id);
|
||||||
return tid;
|
return { tid, count: 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
let cid;
|
let cid;
|
||||||
|
|||||||
Reference in New Issue
Block a user