feat: Add track deletion endpoint with x402 auth#16
Merged
rawgroundbeef merged 6 commits intomainfrom Feb 17, 2026
Merged
Conversation
Owner
rawgroundbeef
commented
Feb 17, 2026
- Add DELETE /api/tracks/:id endpoint for track owners
- Add GET /api/tracks/:id/can-delete for pre-flight checks
- x402 payment header required for authentication (minimal charge)
- Prevents deletion of currently-playing tracks
- Cascade deletes related DB records and cleans up R2 files
- Includes comprehensive test suite
- Update SKILL.md with delete documentation
added 6 commits
February 17, 2026 09:22
- Add DELETE /api/tracks/:id endpoint for track owners - Add GET /api/tracks/:id/can-delete for pre-flight checks - x402 payment header required for authentication (minimal charge) - Prevents deletion of currently-playing tracks - Cascade deletes related DB records and cleans up R2 files - Includes comprehensive test suite - Update SKILL.md with delete documentation
- Add CI workflow that runs on PRs to main - Run typecheck, API tests, and web build - Add vitest config and test scripts to API package - Separate lint job for faster feedback
- Fix import path (./delete instead of ../src/routes/delete) - Add explicit types for all res.json() calls
- Use proper Hono app.fetch() with full URLs - Mount routes correctly at /api/tracks - Mock x402 middleware for DELETE tests - Fix wallet address format (42 chars required)
- Create auth.ts middleware with requireWalletAuth and extractWalletOptional - Add requireOwnership helper for resource ownership checks - Extend Hono context types for walletAddress - Import auth middleware in delete route (ready for future refactor)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.