diff --git a/apps/web/src/views/AdminView.tsx b/apps/web/src/views/AdminView.tsx index 5b4d524..206f789 100644 --- a/apps/web/src/views/AdminView.tsx +++ b/apps/web/src/views/AdminView.tsx @@ -252,6 +252,21 @@ function TopicsManagement() { } }; + const handleToggleGlobal = async (topic: Topic) => { + try { + await client.api.topics[":id"].$post( + { + param: { id: topic.id }, + json: { isGlobal: !topic.isGlobal }, + }, + { init: { credentials: "include" } }, + ); + fetchAllTopics(); + } catch (error) { + console.error(error); + } + }; + if (loading) return
Loading topics...
; return ( @@ -320,13 +335,27 @@ function TopicsManagement() { {topic.approver?.name || "-"} - +
+ + +
))}