Web: Added count=1 to @root filter (fix speed issue)

This commit is contained in:
Alexey Safronov 2022-12-29 13:49:38 +03:00
parent fde5689aec
commit ec84d70835

View File

@ -168,8 +168,10 @@ const sortInDisplayOrder = (folders) => {
};
export function getFoldersTree() {
return request({ method: "get", url: "/files/@root?filterType=2" }).then(
(response) => {
return request({
method: "get",
url: "/files/@root?filterType=2&count=1",
}).then((response) => {
const folders = sortInDisplayOrder(response);
return folders.map((data, index) => {
@ -205,8 +207,7 @@ export function getFoldersTree() {
security: data.current.security,
};
});
}
);
});
}
export function getCommonFoldersTree() {