mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
refactor(core): normalize service naming across app runtime
This commit is contained in:
@@ -14,7 +14,10 @@ export interface DuplicateDetectionDeps {
|
||||
) => Promise<unknown>;
|
||||
notesInfo: (noteIds: number[]) => Promise<unknown>;
|
||||
getDeck: () => string | null | undefined;
|
||||
resolveFieldName: (noteInfo: NoteInfo, preferredName: string) => string | null;
|
||||
resolveFieldName: (
|
||||
noteInfo: NoteInfo,
|
||||
preferredName: string,
|
||||
) => string | null;
|
||||
logWarn: (message: string, error: unknown) => void;
|
||||
}
|
||||
|
||||
@@ -44,7 +47,9 @@ export async function findDuplicateNote(
|
||||
const query = `${deckPrefix}"${escapedFieldName}:${escapedExpression}"`;
|
||||
|
||||
try {
|
||||
const noteIds = (await deps.findNotes(query, { maxRetries: 0 }) as number[]);
|
||||
const noteIds = (await deps.findNotes(query, {
|
||||
maxRetries: 0,
|
||||
})) as number[];
|
||||
return await findFirstExactDuplicateNoteId(
|
||||
noteIds,
|
||||
excludeNoteId,
|
||||
|
||||
Reference in New Issue
Block a user