mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 05:55:12 +00:00
perf(backend): reduce db query
This commit is contained in:
parent
a561b83070
commit
f4588f3907
1 changed files with 1 additions and 1 deletions
|
@ -288,7 +288,7 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
const meId = me ? me.id : null;
|
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;
|
const host = note.userHost;
|
||||||
|
|
||||||
let text = note.text;
|
let text = note.text;
|
||||||
|
|
Loading…
Reference in a new issue