AlexeySafronov
d568693154
+ Added new Clients for CRM/Products + Removed old fake coming-soon pages + Added combineUrl and AppSettingsConfig with proxyUrl + Added new fields to modules info on Server + Fixed work with icon and image urls + Added CRM/Projects to nginx/onlyoffice.conf + Applied combineUrl in studio links + Added and applied "id" field in package.json of all Clients + Added new bat files CrmClient.bat and ProjectsClient.bat + Fixed ProductClassName for Files
25 lines
635 B
JavaScript
25 lines
635 B
JavaScript
import { request } from "../client";
|
|
import { combineUrl } from "../../utils";
|
|
import { AppServerConfig } from "../../constants";
|
|
const { proxyURL } = AppServerConfig;
|
|
|
|
export function getModulesList() {
|
|
return request({
|
|
method: "get",
|
|
url: "/modules/info",
|
|
}).then((modules) => {
|
|
const workingModules = modules.filter(
|
|
(module) => typeof module === "object"
|
|
);
|
|
const newModules = workingModules.map((m) => {
|
|
return {
|
|
...m,
|
|
iconUrl: combineUrl(proxyURL, m.link, m.iconUrl),
|
|
imageUrl: combineUrl(proxyURL, m.link, m.imageUrl),
|
|
};
|
|
});
|
|
|
|
return newModules;
|
|
});
|
|
}
|