From 752195ead09003e704de38c07aa45d72375d25cf Mon Sep 17 00:00:00 2001 From: NicolasRichel Date: Tue, 24 Oct 2023 15:17:28 +0200 Subject: [PATCH 1/2] PATCH: fix service injection --- src/components/bcf-settings/BcfSettings.vue | 8 +++----- src/components/bcf-topic-form/BcfTopicForm.vue | 7 +++---- .../bcf-topic-overview/BcfTopicOverview.vue | 6 ++---- .../bcf-topic-comments/BcfTopicComments.vue | 4 ++-- .../topic-comment/TopicComment.vue | 12 +++++------- 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/components/bcf-settings/BcfSettings.vue b/src/components/bcf-settings/BcfSettings.vue index 59f9c94..131b0f2 100644 --- a/src/components/bcf-settings/BcfSettings.vue +++ b/src/components/bcf-settings/BcfSettings.vue @@ -80,15 +80,13 @@ export default { }, emits: ["back", "close", "extension-created", "extension-updated", "extension-deleted"], setup(props, { emit }) { - const service = useService(); - const createExtension = async (event) => { - const ext = await service.createExtension(props.project, event.extensionType, event.data); + const ext = await useService().createExtension(props.project, event.extensionType, event.data); emit("extension-created", ext); }; const updateExtension = async (event) => { - const ext = await service.updateExtension( + const ext = await useService().updateExtension( props.project, event.extensionType, event.extension, @@ -98,7 +96,7 @@ export default { }; const deleteExtension = async (event) => { - await service.deleteExtension(props.project, event.extensionType, event.extension); + await useService().deleteExtension(props.project, event.extensionType, event.extension); emit("extension-deleted", event.extension); }; diff --git a/src/components/bcf-topic-form/BcfTopicForm.vue b/src/components/bcf-topic-form/BcfTopicForm.vue index 1dde4fb..9201239 100644 --- a/src/components/bcf-topic-form/BcfTopicForm.vue +++ b/src/components/bcf-topic-form/BcfTopicForm.vue @@ -30,7 +30,6 @@