From cb3499c0c2f48b9b5b9f129a55b91a843c3b210e Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:54:06 +0200 Subject: [PATCH] Replace openapi-typescript-fetch with openapi-fetch in Toolshed --- lib/tool_shed/webapp/frontend/package.json | 2 +- .../frontend/src/components/RegisterPage.vue | 18 +++-- .../src/components/RepositoryActions.vue | 8 ++- .../src/components/RevisionActions.vue | 38 +++++----- .../src/components/pages/AdminControls.vue | 7 +- .../src/components/pages/ChangePassword.vue | 14 ++-- .../pages/CitableRepositoryPage.vue | 13 ++-- .../src/components/pages/ManageApiKey.vue | 35 +++++++--- .../components/pages/RepositoriesBySearch.vue | 12 +++- .../src/components/pages/RepositoryPage.vue | 40 ++++++----- .../webapp/frontend/src/schema/fetcher.ts | 23 ++----- .../webapp/frontend/src/schema/index.ts | 2 +- .../webapp/frontend/src/stores/auth.store.ts | 28 ++++---- .../frontend/src/stores/categories.store.ts | 7 +- .../frontend/src/stores/repository.store.ts | 69 +++++++++---------- .../webapp/frontend/src/stores/users.store.ts | 7 +- lib/tool_shed/webapp/frontend/src/util.ts | 8 +-- 17 files changed, 178 insertions(+), 153 deletions(-) diff --git a/lib/tool_shed/webapp/frontend/package.json b/lib/tool_shed/webapp/frontend/package.json index 0050777dadba..2423b4e2301d 100644 --- a/lib/tool_shed/webapp/frontend/package.json +++ b/lib/tool_shed/webapp/frontend/package.json @@ -48,7 +48,7 @@ "e": "^0.2.2", "graphql": "^16.6.0", "graphql-tag": "^2.12.6", - "openapi-typescript-fetch": "^1.1.3", + "openapi-fetch": "^0.10.2", "pinia": "^2.0.28", "quasar": "^2.5.0", "vue": "^3.2.6", diff --git a/lib/tool_shed/webapp/frontend/src/components/RegisterPage.vue b/lib/tool_shed/webapp/frontend/src/components/RegisterPage.vue index a66cf394f529..c28d55571940 100644 --- a/lib/tool_shed/webapp/frontend/src/components/RegisterPage.vue +++ b/lib/tool_shed/webapp/frontend/src/components/RegisterPage.vue @@ -1,7 +1,7 @@ diff --git a/lib/tool_shed/webapp/frontend/src/components/pages/ChangePassword.vue b/lib/tool_shed/webapp/frontend/src/components/pages/ChangePassword.vue index de69706dec34..ae2a05b4dda7 100644 --- a/lib/tool_shed/webapp/frontend/src/components/pages/ChangePassword.vue +++ b/lib/tool_shed/webapp/frontend/src/components/pages/ChangePassword.vue @@ -2,7 +2,7 @@ import { ref } from "vue" import ModalForm from "@/components/ModalForm.vue" import { AUTH_FORM_INPUT_PROPS } from "@/constants" -import { fetcher } from "@/schema" +import { client } from "@/schema" import { errorMessage } from "@/util" import ErrorBanner from "@/components/ErrorBanner.vue" import router from "@/router" @@ -11,13 +11,15 @@ const current = ref("") const password = ref("") const confirm = ref("") const error = ref(null) -const changePasswordFetcher = fetcher.path("/api_internal/change_password").method("put").create() async function onChange() { - changePasswordFetcher({ - current: current.value, - password: password.value, - }) + client + .PUT("/api_internal/change_password", { + body: { + current: current.value, + password: password.value, + }, + }) .then(() => { router.push("/") }) diff --git a/lib/tool_shed/webapp/frontend/src/components/pages/CitableRepositoryPage.vue b/lib/tool_shed/webapp/frontend/src/components/pages/CitableRepositoryPage.vue index bbf717fecde4..15b8139e188c 100644 --- a/lib/tool_shed/webapp/frontend/src/components/pages/CitableRepositoryPage.vue +++ b/lib/tool_shed/webapp/frontend/src/components/pages/CitableRepositoryPage.vue @@ -1,13 +1,11 @@