style: 格式化工作台控制器
This commit is contained in:
1 parent
4512d2601d
commit
f3adf7bc15
1 file changed
+14
-12
@@ -102,18 +102,20 @@ class AdminWorkspaceController {
|
|||||||
]);
|
]);
|
||||||
const installed = new Map(installations.map((item) => [item.capabilityKey, item]));
|
const installed = new Map(installations.map((item) => [item.capabilityKey, item]));
|
||||||
const template = getBrandTemplate(templateKey);
|
const template = getBrandTemplate(templateKey);
|
||||||
return (template?.capabilities ?? []).map((key) => capabilityRegistry[key]).map((definition) => {
|
return (template?.capabilities ?? [])
|
||||||
const item = installed.get(definition.key);
|
.map((key) => capabilityRegistry[key])
|
||||||
return {
|
.map((definition) => {
|
||||||
id: item?.id ?? null,
|
const item = installed.get(definition.key);
|
||||||
capabilityKey: definition.key,
|
return {
|
||||||
capabilityVersion: item?.capabilityVersion ?? definition.version,
|
id: item?.id ?? null,
|
||||||
status: item?.status ?? "enabled",
|
capabilityKey: definition.key,
|
||||||
config: item?.config ?? {},
|
capabilityVersion: item?.capabilityVersion ?? definition.version,
|
||||||
source: item ? "brand" : "template",
|
status: item?.status ?? "enabled",
|
||||||
updatedAt: item?.updatedAt ?? null,
|
config: item?.config ?? {},
|
||||||
};
|
source: item ? "brand" : "template",
|
||||||
});
|
updatedAt: item?.updatedAt ?? null,
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get("sample-content/preview")
|
@Get("sample-content/preview")
|
||||||
|
|||||||
Reference in new issue
Block a user