mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Don't try to parse JSON being returned from the API
This commit is contained in:
@@ -2,7 +2,11 @@ import http from '@/api/http';
|
||||
|
||||
export default (server: string, file: string): Promise<string> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get(`/api/client/servers/${server}/files/contents`, { params: { file } })
|
||||
http.get(`/api/client/servers/${server}/files/contents`, {
|
||||
params: { file },
|
||||
transformResponse: res => res,
|
||||
responseType: 'text/plain',
|
||||
})
|
||||
.then(({ data }) => resolve(data))
|
||||
.catch(reject);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user