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
at feat/atb-60-theme-import-export 66 lines 1.7 kB view raw
1meta { 2 name: Ban User 3 type: http 4 seq: 1 5} 6 7post { 8 url: {{appview_url}}/api/mod/ban 9} 10 11headers { 12 Content-Type: application/json 13} 14 15body:json { 16 { 17 "targetDid": "did:plc:example", 18 "reason": "Violation of community guidelines" 19 } 20} 21 22assert { 23 res.status: eq 200 24 res.body.success: eq true 25 res.body.action: eq space.atbb.modAction.ban 26} 27 28docs { 29 Bans a user from the forum (moderator action). 30 31 Requires authentication via session cookie and `space.atbb.permission.banUsers` permission. 32 33 Body parameters: 34 - targetDid: string (required) - DID of the user to ban 35 - reason: string (required) - Reason for the ban (1-3000 characters, cannot be empty) 36 37 Returns: 38 { 39 "success": true, 40 "action": "space.atbb.modAction.ban", 41 "targetDid": "did:plc:example", 42 "uri": "at://forum-did/space.atbb.modAction/rkey", 43 "cid": "bafyrei...", 44 "alreadyActive": false 45 } 46 47 If user is already banned, returns 200 with `alreadyActive: true` (idempotent). 48 49 Writes a modAction record to the Forum DID's PDS with: 50 - action: "space.atbb.modAction.ban" 51 - subject: { did: targetDid } 52 - reason: provided reason 53 - createdBy: moderator's DID 54 55 Error codes: 56 - 400: Invalid input (missing/invalid did, missing/empty reason, malformed JSON) 57 - 401: Unauthorized (not authenticated) 58 - 403: Forbidden (lacks banUsers permission) 59 - 404: Target user not found (not a forum member) 60 - 500: ForumAgent not available (server configuration issue) 61 - 503: ForumAgent not authenticated or unable to reach Forum PDS (retry later) 62 63 Notes: 64 - Bans are additive - unban writes a new reversal action 65 - Target user must be a forum member (have a membership record) 66}