mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-14 12:23:44 +02:00
A few adjustments for chunking the new file edit page
This commit is contained in:
9
resources/scripts/api/server/files/getFileContents.ts
Normal file
9
resources/scripts/api/server/files/getFileContents.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
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 } })
|
||||
.then(({ data }) => resolve(data))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user