Update API endpoint for SSO link creation in billing hook

- Changed the API endpoint from `/auth/sso-link` to `/api/auth/sso-link` in the `useCreatePaymentMethodsSsoLink` function to align with the updated API structure.
This commit is contained in:
barsa 2025-12-12 18:56:26 +09:00
parent 4b5d0d0e5e
commit 90e80c648b
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts"; import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@ -178,7 +178,7 @@ export function useCreatePaymentMethodsSsoLink(
): UseMutationResult<InvoiceSsoLink, Error, void> { ): UseMutationResult<InvoiceSsoLink, Error, void> {
return useMutation({ return useMutation({
mutationFn: async () => { mutationFn: async () => {
const response = await apiClient.POST<InvoiceSsoLink>("/auth/sso-link", { const response = await apiClient.POST<InvoiceSsoLink>("/api/auth/sso-link", {
body: { destination: "index.php?rp=/account/paymentmethods" }, body: { destination: "index.php?rp=/account/paymentmethods" },
}); });
return getDataOrThrow(response, "Failed to create payment methods SSO link"); return getDataOrThrow(response, "Failed to create payment methods SSO link");