File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import http from '@/api/http';
33export default ( server : string , file : string ) : Promise < string > => {
44 return new Promise ( ( resolve , reject ) => {
55 http . get ( `/api/client/servers/${ server } /files/contents` , {
6- params : { file } ,
6+ params : { file : file . split ( '/' ) . map ( item => encodeURIComponent ( item ) ) . join ( '/' ) } ,
77 transformResponse : res => res ,
88 responseType : 'text' ,
99 } )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export interface FileObject {
1717
1818export default async ( uuid : string , directory ?: string ) : Promise < FileObject [ ] > => {
1919 const { data } = await http . get ( `/api/client/servers/${ uuid } /files/list` , {
20- params : { directory } ,
20+ params : { directory : directory ?. split ( '/' ) . map ( item => encodeURIComponent ( item ) ) . join ( '/' ) } ,
2121 } ) ;
2222
2323 return ( data . data || [ ] ) . map ( rawDataToFileObject ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export default () => {
1414 focusThrottleInterval : 30000 ,
1515 revalidateOnMount : false ,
1616 refreshInterval : 0 ,
17+ errorRetryCount : 2 ,
1718 } ,
1819 ) ;
1920} ;
You can’t perform that action at this time.
0 commit comments