Add working with GET /@favorites

This commit is contained in:
Vladislav Makhov 2020-09-29 16:52:54 +03:00
parent 7bd39e2152
commit 731a8b8504

View File

@ -44,7 +44,7 @@ export function getFolder(folderId, filter) {
}
export function getFoldersTree() {
const rootFoldersPaths = ['@my', '@share', '@common', /*'@projects',*/ '@trash']; //TODO: need get from settings
const rootFoldersPaths = ['@my', '@share', '@common', /*'@projects',*/ '@trash', '@favorites']; //TODO: need get from settings
const requestsArray = rootFoldersPaths.map(path => request({ method: "get", url: `/files/${path}?filterType=2` }));
return axios.all(requestsArray)
@ -91,6 +91,15 @@ export function getCommonFolderList(filter = FilesFilter.getDefault()) {
return request(options);
}
export function getFavoritesFolderList(filter = FilesFilter.getDefault()) {
const options = {
method: "get",
url: `/files/@favorites`
};
return request(options);
}
export function getProjectsFolderList(filter = FilesFilter.getDefault()) {
const options = {
method: "get",