Skip to content

Commit

Permalink
Update get-modules.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Fgerthoffert authored Dec 16, 2021
1 parent d2c9e8b commit f637040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/modules/utils/get-modules.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios';

const getModules = async (url: string, username: string, password: string) => {
const modulesResponse = await axios.get(url + '/modules/api/bundles/org.jahia.modules/*/*/_info', {
const modulesResponse = await axios.get(url + '/modules/api/bundles/*/*/*/_info', {
headers: {
Origin: url
},
Expand All @@ -13,7 +13,7 @@ const getModules = async (url: string, username: string, password: string) => {
if (modulesResponse.data !== undefined) {
const instanceModules: any = Object.values(modulesResponse.data)[0];
const modules = [];
const regExp = new RegExp(/org\.jahia\.modules\/(.*)\/(.*)/);
const regExp = new RegExp(/.*\/(.*)\/(.*)/);

const instanceModulesArr: Array<any> = Object.entries(instanceModules);
for (const [ key, value ] of instanceModulesArr) {
Expand Down

0 comments on commit f637040

Please sign in to comment.