Skip to content

Add image CRUD endpoints, seed the DB, and update Prisma#9

Merged
hussein-m-kandil merged 12 commits intomainfrom
dev
Jul 15, 2025
Merged

Add image CRUD endpoints, seed the DB, and update Prisma#9
hussein-m-kandil merged 12 commits intomainfrom
dev

Conversation

@hussein-m-kandil
Copy link
Copy Markdown
Owner

This pull request adds full image management support to the blog API, improves test reliability, and updates Prisma dependencies.

What’s New

  • 🖼️ Added image upload: POST /api/v1/images
  • 📥 Added endpoints to get one or many images
  • 📝 Added update endpoint: PATCH /api/v1/images/:id
  • ❌ Added delete endpoint: DELETE /api/v1/images/:id
  • 🔁 Images can now be attached when creating or updating posts
  • 🧠 Extracted image metadata using Sharp on upload

Enhancements

  • 🧱 Added and migrated Image model in Prisma
  • 🔐 Omitted sensitive image fields globally from API responses
  • 🧼 Added types for image handling
  • 🌱 Seeded database with sample users and posts
  • 🧪 Re-enabled test isolation for reliable test runs
  • 📦 Updated prisma and @prisma/client

@hussein-m-kandil hussein-m-kandil merged commit dc7358d into main Jul 15, 2025
1 check passed
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