@@ -450,15 +450,16 @@ export const useConsumerHostServices = (
450450 return res ;
451451 } , [ ] ) ;
452452
453- const getUserSubscriptions = useCallback ( async ( ) : Promise <
454- AxiosResponse < IGetUserSubscription [ ] | ConsumerHostError >
455- > => {
456- const res = await instance . get < IGetUserSubscription [ ] | ConsumerHostError > ( '/users/subscriptions' , {
457- headers : authHeaders . current ,
458- } ) ;
453+ const getUserSubscriptions = useCallback (
454+ async ( address : string ) : Promise < AxiosResponse < IGetUserSubscription [ ] | ConsumerHostError > > => {
455+ const res = await instance . get < IGetUserSubscription [ ] | ConsumerHostError > ( `/subscriptions/wallet/${ address } ` , {
456+ headers : authHeaders . current ,
457+ } ) ;
459458
460- return res ;
461- } , [ ] ) ;
459+ return res ;
460+ } ,
461+ [ ] ,
462+ ) ;
462463
463464 // 新增: 创建订阅
464465 const createSubscription = useCallback (
@@ -507,13 +508,13 @@ export const useConsumerHostServices = (
507508
508509 // Get user hosting plans for a specific project
509510 const getUserHostingPlansByProject = useCallback (
510- async ( projectId : number ) : Promise < AxiosResponse < IGetHostingPlans [ ] | ConsumerHostError > > => {
511- const res = await instance . get < IGetHostingPlans [ ] | ConsumerHostError > (
512- `/users/hosting-plans/project/ ${ projectId } ` ,
513- {
514- headers : authHeaders . current ,
511+ async ( projectId : number , wallet : string ) : Promise < AxiosResponse < IGetHostingPlans [ ] | ConsumerHostError > > => {
512+ const res = await instance . get < IGetHostingPlans [ ] | ConsumerHostError > ( `/hosting-plans/project/ ${ projectId } ` , {
513+ headers : authHeaders . current ,
514+ params : {
515+ wallet ,
515516 } ,
516- ) ;
517+ } ) ;
517518
518519 return res ;
519520 } ,
0 commit comments