mirror of
https://github.com/System-End/haxmas-day-4.git
synced 2026-04-19 11:20:23 +00:00
No description
| src | ||
| .dockerignore | ||
| .gitignore | ||
| bun.lock | ||
| Dockerfile | ||
| drizzle.config.ts | ||
| fly.toml | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
To install dependencies:
bun install
To run:
bun run dev
Endpoints
Get all items
GET /api/wishlist
Add an item
POST /api/wishlist
Content-Type: application/json
Body:
{
"item": "Nintendo Switch",
"link": "https://amazon.com/...",
"price": 29999,
"priority": 1,
"category": "gaming",
"notes": "OLED version please!"
}
| Field | Type | Required |
|---|---|---|
item |
string | ✅ |
link |
string | ❌ |
price |
number | ❌ |
priority |
number | ❌ |
category |
string | ❌ |
notes |
string | ❌ |
Claim an item
PATCH /api/wishlist/:id/claim
Delete an item
DELETE /api/wishlist/:id
Quick Examples
# Add item
curl -X POST http://localhost:3000/api/wishlist \
-H "content-type: application/json" \
-d '{"item":"PS5", "category":"gaming", "priority":1}'
# List all
curl http://localhost:3000/api/wishlist
# Claim item 1
curl -X PATCH http://localhost:3000/api/wishlist/1/claim
# Delete item 1
curl -X DELETE http://localhost:3000/api/wishlist/1