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