WIP! A BB-style forum, on the ATmosphere!
We're still working... we'll be back soon when we have something to show off!
node
typescript
hono
htmx
atproto
1meta {
2 name: Update Category
3 type: http
4 seq: 11
5}
6
7put {
8 url: {{appview_url}}/api/admin/categories/:id
9}
10
11params:path {
12 id: {{category_id}}
13}
14
15body:json {
16 {
17 "name": "Updated Name",
18 "description": "Updated description.",
19 "sortOrder": 2
20 }
21}
22
23assert {
24 res.status: eq 200
25 res.body.uri: isDefined
26 res.body.cid: isDefined
27}
28
29docs {
30 Update an existing forum category. Fetches existing rkey from DB, calls putRecord
31 with updated fields preserving the original createdAt.
32
33 **Requires:** space.atbb.permission.manageCategories
34
35 Path params:
36 - id: Category database ID (bigint as string)
37
38 Body:
39 - name (required): New display name
40 - description (optional): New description
41 - sortOrder (optional): New sort position
42
43 Returns (200):
44 {
45 "uri": "at://did:plc:.../space.atbb.forum.category/abc123",
46 "cid": "bafyrei..."
47 }
48
49 Error codes:
50 - 400: Missing name, empty name, invalid ID format, malformed JSON
51 - 401: Not authenticated
52 - 403: Missing manageCategories permission
53 - 404: Category not found
54 - 500: ForumAgent not configured
55 - 503: PDS network error
56}