mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-01 17:59:28 -05:00
refac: frontend
This commit is contained in:
@@ -42,13 +42,11 @@
|
||||
}
|
||||
|
||||
tools = $_tools.reduce((a, tool, i, arr) => {
|
||||
if (availableToolIds.includes(tool.id) || ($user?.role ?? 'user') === 'admin') {
|
||||
a[tool.id] = {
|
||||
name: tool.name,
|
||||
description: tool.meta.description,
|
||||
enabled: selectedToolIds.includes(tool.id)
|
||||
};
|
||||
}
|
||||
a[tool.id] = {
|
||||
name: tool.name,
|
||||
description: tool.meta.description,
|
||||
enabled: selectedToolIds.includes(tool.id)
|
||||
};
|
||||
return a;
|
||||
}, {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user