mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Pass one at unfucking the stupid file encoding issues
This commit is contained in:
@@ -18,7 +18,9 @@ export interface FileObject {
|
||||
|
||||
export default async (uuid: string, directory?: string): Promise<FileObject[]> => {
|
||||
const { data } = await http.get(`/api/client/servers/${uuid}/files/list`, {
|
||||
params: { directory: encodeURI(directory ?? '/') },
|
||||
// At this point the directory is still encoded so we need to decode it since axios
|
||||
// will automatically re-encode this value before sending it along in the request.
|
||||
params: { directory: decodeURI(directory ?? '/') },
|
||||
});
|
||||
|
||||
return (data.data || []).map(rawDataToFileObject);
|
||||
|
||||
Reference in New Issue
Block a user