@@ -376,11 +376,11 @@ export const useSubsStore = defineStore('subsStore', {
376376 console . log ( 'fetchShareData err' , err ) ;
377377 } ) ;
378378 } ,
379- async deleteShare ( token : string , isShowNotify : boolean = true ) {
379+ async deleteShare ( token : string , type : string , name : string , isShowNotify : boolean = true ) {
380380 try {
381381 const { showNotify } = useAppNotifyStore ( ) ;
382382
383- const { data } = await shareApi . deleteShare ( token ) ;
383+ const { data } = await shareApi . deleteShare ( token , type , name ) ;
384384 if ( data . status === "success" ) {
385385 await this . fetchShareData ( ) ;
386386 isShowNotify && showNotify ( {
@@ -392,11 +392,11 @@ export const useSubsStore = defineStore('subsStore', {
392392 console . log ( 'deleteShare error' , error ) ;
393393 }
394394 } ,
395- async updateShare ( token : string , data : ShareToken ) {
395+ async updateShare ( token : string , type : string , name : string , data : ShareToken ) {
396396 const { showNotify } = useAppNotifyStore ( ) ;
397397 try {
398- await shareApi . deleteShare ( token ) ;
399- await shareApi . createShare ( data ) ;
398+ await shareApi . deleteShare ( token , type , name ) ;
399+ await shareApi . createShare ( data ) ;
400400 await this . fetchShareData ( ) ;
401401 } catch ( error ) {
402402 console . log ( 'updateShare error' , error ) ;
0 commit comments