diff --git a/src/main.ts b/src/main.ts index a08be41..b72add6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -48,7 +48,7 @@ export default class MediaDbPlugin extends Plugin { return false; } if (!checking) { - this.updateActiveNote() + this.updateActiveNote(); } return true; }, diff --git a/src/modals/MediaDbIdSearchModal.ts b/src/modals/MediaDbIdSearchModal.ts index d7dc4cb..4586b55 100644 --- a/src/modals/MediaDbIdSearchModal.ts +++ b/src/modals/MediaDbIdSearchModal.ts @@ -50,7 +50,7 @@ export class MediaDbIdSearchModal extends Modal { if (!api) { this.onSubmit(new Error('the selected api does not exist')); } - const res = await api.getById({id: this.query} as MediaTypeModel); // TODO: fix jank + const res = await api.getById(this.query); this.onSubmit(null, res); } catch (e) { this.onSubmit(e); diff --git a/src/tests/TestAPI.ts b/src/tests/TestAPI.ts index 324765b..19beadf 100644 --- a/src/tests/TestAPI.ts +++ b/src/tests/TestAPI.ts @@ -17,7 +17,7 @@ export class TestAPI extends APIModel { } - async getById(item: MediaTypeModel): Promise { + async getById(id: string): Promise { return undefined; }