This commit is contained in:
syuilo 2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View file

@ -21,7 +21,7 @@ export default class NotesChart extends Chart<NotesLog> {
},
remote: {
total: latest.remote.total,
}
},
};
}
@ -55,7 +55,7 @@ export default class NotesChart extends Chart<NotesLog> {
protected async fetchActual(): Promise<DeepPartial<NotesLog>> {
const [localCount, remoteCount] = await Promise.all([
Notes.count({ userHost: null }),
Notes.count({ userHost: Not(IsNull()) })
Notes.count({ userHost: Not(IsNull()) }),
]);
return {
@ -64,14 +64,14 @@ export default class NotesChart extends Chart<NotesLog> {
},
remote: {
total: remoteCount,
}
},
};
}
@autobind
public async update(note: Note, isAdditional: boolean) {
const update: Obj = {
diffs: {}
diffs: {},
};
update.total = isAdditional ? 1 : -1;
@ -91,7 +91,7 @@ export default class NotesChart extends Chart<NotesLog> {
}
await this.inc({
[note.userHost === null ? 'local' : 'remote']: update
[note.userHost === null ? 'local' : 'remote']: update,
});
}
}