enhance: 各ノートが被クリップ数を保持するようにし、無意味にnotes/clipsを叩かないように

This commit is contained in:
syuilo 2023-09-17 10:55:26 +09:00
parent 907d519da3
commit f7c6932a83
9 changed files with 48 additions and 7 deletions

View file

@ -94,13 +94,14 @@ function fetchNote() {
noteId: props.noteId,
}).then(res => {
note = res;
Promise.all([
// 2023-10-01notes/clips
if (note.clippedCount > 0 || new Date(note.createdAt).getTime() < new Date('2023-10-01').getTime()) {
os.api('notes/clips', {
noteId: note.id,
}),
]).then(([_clips]) => {
clips = _clips;
});
}).then((_clips) => {
clips = _clips;
});
}
}).catch(err => {
error = err;
});