mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
* Fix extension endpoints being queries without a trailing slash * Don't swallow exceptions when loading an extension
This commit is contained in:
committed by
GitHub
parent
0a722e8de6
commit
cf603c6ef5
@@ -17,7 +17,7 @@ export async function registerDisplays() {
|
||||
.filter((m) => m);
|
||||
|
||||
try {
|
||||
const customResponse = await api.get('/extensions/displays');
|
||||
const customResponse = await api.get('/extensions/displays/');
|
||||
const displays: string[] = customResponse.data.data || [];
|
||||
|
||||
await asyncPool(5, displays, async (displayName) => {
|
||||
@@ -27,7 +27,7 @@ export async function registerDisplays() {
|
||||
);
|
||||
modules.push(result.default);
|
||||
} catch (err) {
|
||||
console.warn(`Couldn't load custom displays "${displayName}"`);
|
||||
console.warn(`Couldn't load custom displays "${displayName}":`, err);
|
||||
}
|
||||
});
|
||||
} catch {
|
||||
|
||||
@@ -17,7 +17,7 @@ export async function registerInterfaces() {
|
||||
.filter((m) => m);
|
||||
|
||||
try {
|
||||
const customResponse = await api.get('/extensions/interfaces');
|
||||
const customResponse = await api.get('/extensions/interfaces/');
|
||||
const interfaces: string[] = customResponse.data.data || [];
|
||||
|
||||
await asyncPool(5, interfaces, async (interfaceName) => {
|
||||
@@ -27,7 +27,7 @@ export async function registerInterfaces() {
|
||||
);
|
||||
modules.push(result.default);
|
||||
} catch (err) {
|
||||
console.warn(`Couldn't load custom interface "${interfaceName}"`);
|
||||
console.warn(`Couldn't load custom interface "${interfaceName}":`, err);
|
||||
}
|
||||
});
|
||||
} catch {
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function registerLayouts() {
|
||||
.filter((m) => m);
|
||||
|
||||
try {
|
||||
const customResponse = await api.get('/extensions/layouts');
|
||||
const customResponse = await api.get('/extensions/layouts/');
|
||||
const layouts: string[] = customResponse.data.data || [];
|
||||
|
||||
await asyncPool(5, layouts, async (layoutName) => {
|
||||
@@ -26,7 +26,7 @@ export async function registerLayouts() {
|
||||
);
|
||||
modules.push(result.default);
|
||||
} catch (err) {
|
||||
console.warn(`Couldn't load custom layout "${layoutName}"`);
|
||||
console.warn(`Couldn't load custom layout "${layoutName}":`, err);
|
||||
}
|
||||
});
|
||||
} catch {
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function loadModules() {
|
||||
.filter((m) => m);
|
||||
|
||||
try {
|
||||
const customResponse = await api.get('/extensions/modules');
|
||||
const customResponse = await api.get('/extensions/modules/');
|
||||
const modules: string[] = customResponse.data.data || [];
|
||||
|
||||
await asyncPool(5, modules, async (moduleName) => {
|
||||
@@ -36,7 +36,7 @@ export async function loadModules() {
|
||||
});
|
||||
queuedModules.push(result.default);
|
||||
} catch (err) {
|
||||
console.warn(`Couldn't load custom module "${moduleName}"`);
|
||||
console.warn(`Couldn't load custom module "${moduleName}":`, err);
|
||||
}
|
||||
});
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user