mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 18:31:45 +08:00
refactor(contract): restructure console contracts with nested billing module (#30999)
This commit is contained in:
@@ -3,8 +3,8 @@ import { consoleClient, consoleQuery } from '@/service/client'
|
||||
|
||||
export const useBindPartnerStackInfo = () => {
|
||||
return useMutation({
|
||||
mutationKey: consoleQuery.bindPartnerStack.mutationKey(),
|
||||
mutationFn: (data: { partnerKey: string, clickId: string }) => consoleClient.bindPartnerStack({
|
||||
mutationKey: consoleQuery.billing.bindPartnerStack.mutationKey(),
|
||||
mutationFn: (data: { partnerKey: string, clickId: string }) => consoleClient.billing.bindPartnerStack({
|
||||
params: { partnerKey: data.partnerKey },
|
||||
body: { click_id: data.clickId },
|
||||
}),
|
||||
@@ -13,10 +13,10 @@ export const useBindPartnerStackInfo = () => {
|
||||
|
||||
export const useBillingUrl = (enabled: boolean) => {
|
||||
return useQuery({
|
||||
queryKey: consoleQuery.billingUrl.queryKey(),
|
||||
queryKey: consoleQuery.billing.invoices.queryKey(),
|
||||
enabled,
|
||||
queryFn: async () => {
|
||||
const res = await consoleClient.billingUrl()
|
||||
const res = await consoleClient.billing.invoices()
|
||||
return res.url
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user