mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
perf(backend): reduce db query
This commit is contained in:
parent
a561b83070
commit
f4588f3907
@ -288,7 +288,7 @@ export class NoteEntityService implements OnModuleInit {
|
||||
}, options);
|
||||
|
||||
const meId = me ? me.id : null;
|
||||
const note = typeof src === 'object' ? src : await this.notesRepository.findOneByOrFail({ id: src });
|
||||
const note = typeof src === 'object' ? src : await this.notesRepository.findOneOrFail({ where: { id: src }, relations: ['user'] });
|
||||
const host = note.userHost;
|
||||
|
||||
let text = note.text;
|
||||
|
Loading…
Reference in New Issue
Block a user