mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 05:43:45 +02:00
Add initial support for opening a file in the file manager, still needs more work
This commit is contained in:
11
resources/assets/scripts/api/server/files/getFileContents.ts
Normal file
11
resources/assets/scripts/api/server/files/getFileContents.ts
Normal file
@@ -0,0 +1,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 }
|
||||
})
|
||||
.then(response => resolve(response.data))
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user