diff --git a/api/src/routes/api/drive.ts b/api/src/routes/api/drive.ts index 986c677..76cd9ec 100644 --- a/api/src/routes/api/drive.ts +++ b/api/src/routes/api/drive.ts @@ -34,7 +34,7 @@ driveRouter.post('/deploy', async (req, res) => { }) }) -driveRouter.get('/files', async (req, res) => { +driveRouter.get('/file', async (req, res) => { if (isFileQuery(req.query)) { const filePath = path .join(getTmpFilesFolderPath(), req.query.filePath) @@ -59,7 +59,7 @@ driveRouter.get('/files', async (req, res) => { } }) -driveRouter.patch('/files', async (req, res) => { +driveRouter.patch('/file', async (req, res) => { const filePath = path .join(getTmpFilesFolderPath(), req.body.filePath) .replace(new RegExp('/', 'g'), path.sep) diff --git a/web/src/containers/Drive/main.tsx b/web/src/containers/Drive/main.tsx index aca5e0e..8cfb279 100644 --- a/web/src/containers/Drive/main.tsx +++ b/web/src/containers/Drive/main.tsx @@ -22,7 +22,7 @@ const Main = (props: any) => { if (props.selectedFilePath) { setIsLoading(true) axios - .get(`/SASjsApi/files?filePath=${props.selectedFilePath}`) + .get(`/SASjsApi/drive/file?filePath=${props.selectedFilePath}`) .then((res: any) => { setFileContent(res.data.fileContent) }) @@ -42,7 +42,7 @@ const Main = (props: any) => { } else { setIsLoading(true) axios - .post(`/SASjsApi/files`, { + .patch(`/SASjsApi/drive/file`, { filePath: props.selectedFilePath, fileContent: fileContent }) diff --git a/web/src/containers/Drive/sideBar.tsx b/web/src/containers/Drive/sideBar.tsx index 5a92834..292af29 100644 --- a/web/src/containers/Drive/sideBar.tsx +++ b/web/src/containers/Drive/sideBar.tsx @@ -51,7 +51,7 @@ const SideBar = (props: any) => { useEffect(() => { axios - .get(`/SASjsApi/executor`) + .get(`/SASjsApi/drive/fileTree`) .then((res: any) => { if (res.data && res.data?.status === 'success') { setDirectoryData(res.data.tree)