fix(topic): correct 'make global' API call and improve UI

- Change 'make global' API method from POST to PUT in AdminView.tsx
- Refine backend update logic for 'isGlobal' to correctly handle boolean values
- Improve 'make global' and 'private' UI with icons and better styling in AdminView.tsx and TopicsView.tsx
This commit is contained in:
2026-01-23 22:38:16 +08:00
parent 33530f2c27
commit 5dc6fe43d5
3 changed files with 65 additions and 23 deletions

View File

@@ -180,7 +180,7 @@ api.put(
.update(topics)
.set({
...body,
isGlobal: body.isGlobal ?? (undefined as any),
isGlobal: body.isGlobal !== undefined ? body.isGlobal : undefined,
})
.where(eq(topics.id, id))
.returning();