Skip to content
Snippets Groups Projects
Commit f4588f39 authored by syuilo's avatar syuilo
Browse files

perf(backend): reduce db query

parent a561b830
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment