DocSpace-buildtools/packages/asc-web-common/api/modules/index.js
AlexeySafronov d568693154 Big Fix commit:
+ 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
2021-03-22 00:34:21 +03:00

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;
});
}