mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
fix
This commit is contained in:
parent
a91db7f7a6
commit
91bc65c7da
2 changed files with 5 additions and 2 deletions
|
|
@ -172,6 +172,7 @@ async def delete_toolkit_by_id(request: Request, id: str, user=Depends(get_admin
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
TOOLS = request.app.state.TOOLS
|
TOOLS = request.app.state.TOOLS
|
||||||
|
if id in TOOLS:
|
||||||
del TOOLS[id]
|
del TOOLS[id]
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,9 @@
|
||||||
<button
|
<button
|
||||||
class="self-center w-fit text-sm px-2 py-2 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
|
class="self-center w-fit text-sm px-2 py-2 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
|
||||||
type="button"
|
type="button"
|
||||||
on:click={async () => {
|
on:click={async (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
const res = await deleteToolById(localStorage.token, tool.id).catch((error) => {
|
const res = await deleteToolById(localStorage.token, tool.id).catch((error) => {
|
||||||
toast.error(error);
|
toast.error(error);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue