diff --git a/src/pages/files/add.jsx b/src/pages/files/add.jsx
index 77e96b0..a0827c1 100644
--- a/src/pages/files/add.jsx
+++ b/src/pages/files/add.jsx
@@ -26,7 +26,7 @@ const ModalAddFile = ({ opened, handler, addFiles }) => {
setIsLoading(true);
const formData = new FormData();
files.forEach((file) => formData.append('file', file));
- API.upload(formData)
+ API.files.upload(formData)
.then((res) => {
if (res.status === 200) {
validate(res.data);
diff --git a/src/pages/files/file-selector.jsx b/src/pages/files/file-selector.jsx
index 0f3ef84..f125723 100644
--- a/src/pages/files/file-selector.jsx
+++ b/src/pages/files/file-selector.jsx
@@ -40,7 +40,7 @@ const ModalFileSelector = ({ opened, handleClose, handleSubmit, ...props }) => {
}
useEffect(() => {
- API.getFiles()
+ API.files.list()
.then((res) => {
if (res.status === 200) {
setFiles(res.data);
@@ -56,7 +56,7 @@ const ModalFileSelector = ({ opened, handleClose, handleSubmit, ...props }) => {
useEffect(() => {
if (search.length >= 2) {
- API.searchfiles(search)
+ API.files.search(search)
.then((res) => {
if (res.status === 200) {
setFiles(res.data);
@@ -66,7 +66,7 @@ const ModalFileSelector = ({ opened, handleClose, handleSubmit, ...props }) => {
setNotification(true, err);
});
} else if (search.length === 0) {
- API.getFiles()
+ API.files.list()
.then((res) => {
if (res.status === 200) {
setFiles(res.data);
diff --git a/src/pages/files/index.jsx b/src/pages/files/index.jsx
index c90cc92..5ced79a 100644
--- a/src/pages/files/index.jsx
+++ b/src/pages/files/index.jsx
@@ -15,7 +15,7 @@ const Files = () => {
};
useEffect(() => {
- API.getFiles()
+ API.files.list()
.then((res) => {
if (res.status === 200) {
setFiles(res.data);
diff --git a/src/pages/playlist/index.jsx b/src/pages/playlist/index.jsx
index cff0f55..6ac2d2b 100644
--- a/src/pages/playlist/index.jsx
+++ b/src/pages/playlist/index.jsx
@@ -58,7 +58,7 @@ const Playlist = (item) => {
if (JSON.stringify(item) !== '{}') {
setPlaylist(item);
} else {
- API.getPlaylist(id)
+ API.playlists.get(id)
.then((res) => {
if (res.status === 200) {
setPlaylist(res.data);
@@ -117,7 +117,7 @@ const Playlist = (item) => {
-
+
{
- console.log(e)
if (e) {
handler(e);
}
+ form.reset()
handlerClose();
};