File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed
Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 16571657 } ,
16581658 async saveOrder ( ) {
16591659 const ids = this . collectIds ( ) ;
1660- try {
1661- const resp = await fetch ( '/panel/api/inbounds/reorder' , {
1662- method : 'POST' ,
1663- headers : {
1664- 'Content-Type' : 'application/json' ,
1665- 'X-Requested-With' : 'XMLHttpRequest'
1666- } ,
1667- body : JSON . stringify ( { ids : ids } ) ,
1668- } ) ;
1669- const data = await resp . json ( ) . catch ( ( ) => null ) ;
1670- if ( data && data . success ) {
1671- if ( this . $message ) this . $message . success ( '{{ i18n "pages.inbounds.reordered" }}' ) ;
1672- } else {
1673- const msgText = data && data . msg ? data . msg : 'Reorder failed' ;
1674- if ( this . $message ) this . $message . error ( msgText ) ;
1675- await this . getDBInbounds ( ) ;
1676- }
1677- } catch ( e ) {
1678- console . error ( 'reorder error' , e ) ;
1679- if ( this . $message ) this . $message . error ( 'somethingWentWrong' ) ;
1680- await this . getDBInbounds ( ) ;
1681- }
1660+ await this . submit ( '/panel/api/inbounds/reorder' , JSON . stringify ( { ids : ids } ) ) ;
16821661 } ,
16831662 } ,
16841663 watch : {
You can’t perform that action at this time.
0 commit comments