mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +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.
|
||||
winston.verbose('[notes/assert] No new notes to process.');
|
||||
unlock(id);
|
||||
return tid;
|
||||
return { tid, count: 0 };
|
||||
}
|
||||
|
||||
let cid;
|
||||
|
||||
Reference in New Issue
Block a user