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:
parent
4b5d0d0e5e
commit
90e80c648b
2
apps/portal/next-env.d.ts
vendored
2
apps/portal/next-env.d.ts
vendored
@ -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.
|
||||||
|
|||||||
@ -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");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user