A few adjustments for chunking the new file edit page
This commit is contained in:
parent
8599e2c64b
commit
c66d2cd123
9 changed files with 72 additions and 28 deletions
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 a new issue