Skip to content

pin delete: delete a share you made - #6

Open
terraboops wants to merge 1 commit into
mainfrom
delete-command
Open

terraboops wants to merge 1 commit into
mainfrom
delete-command

Conversation

@terraboops

Copy link
Copy Markdown
Collaborator

Adds pin delete <id-or-url>, which sends DELETE /api/pins/{id}.

The server side is in bitcomplete/pin#43: pin records each share's owner (the signed-in subject) at upload, and only that owner can delete it. Anyone else gets 403. A share made before owners were recorded also gets 403.

Why: pin's end-to-end suite runs against production through this CLI and left every share it made behind. With this command the suite deletes everything it creates and fails if any of it still serves.

  • 204 → deleted <id>, exit 0
  • 404 → not found: <id>, exit 1
  • anything else → http <code>: <body>, exit 1

Test: delete_test.go drives deleteShare against an httptest server for 204, 404 and 403. Lint shows the same 12 findings as main (none new).

Merge order: bitcomplete/pin#43 must be live before this command can work against production. Until then the server answers 405.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sn3acTQsYfyvVidkmhCC5j

pin's end-to-end suite runs against production through this CLI and left
every share it made behind (Operate's review of pin#43). pin delete sends
DELETE /api/pins/{id}; the server lets only the share's owner delete it
(bitcomplete/pin#43).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sn3acTQsYfyvVidkmhCC5j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant