fix: no logging for postgres
This commit is contained in:
parent
13ede22564
commit
2a5598fa7f
1 changed files with 12 additions and 12 deletions
|
@ -428,17 +428,14 @@ export const UserRepository = db.getRepository(User).extend({
|
|||
}).then((notes) => notes.map(({ noteId }) => noteId));
|
||||
|
||||
if (pinnedNoteIds.length > 0) {
|
||||
try {
|
||||
if (scyllaClient) {
|
||||
try {
|
||||
const result = await scyllaClient.execute(
|
||||
prepared.note.select.byIds,
|
||||
[pinnedNoteIds],
|
||||
{ prepare: true },
|
||||
);
|
||||
pinnedNotes = result.rows.map(parseScyllaNote);
|
||||
} else {
|
||||
pinnedNotes = await Notes.findBy({ id: In(pinnedNoteIds) });
|
||||
}
|
||||
} catch (e) {
|
||||
scyllaLogger.error("Failed to fetch pinned notes", {
|
||||
pinnedNoteIds,
|
||||
|
@ -448,6 +445,9 @@ export const UserRepository = db.getRepository(User).extend({
|
|||
pinnedNotes = [];
|
||||
pinnedNoteIds = [];
|
||||
}
|
||||
} else {
|
||||
pinnedNotes = await Notes.findBy({ id: In(pinnedNoteIds) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue