This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 91c8525546 fix(backend): normalize post type to PostType enum + add deploy migration
End-to-end smoke (real Postgres + Redis via docker-compose) caught a real bug
that mocked unit tests missed: createPost passed the request `type` straight to
prisma.post.create, so a client sending lowercase "text" (instead of the
uppercase PostType enum) threw PrismaClientValidationError 500. Now normalized
to the PostType enum (case-insensitive, falls back to POST).

Verified end-to-end: register→login→create post→comment→like→feed all succeed
against a live DB (3 posts / 1 comment / 1 user persisted).

Also adds prisma/migrations/20260629000000_marathon_additions (full schema incl.
MutedWord, Post.contentLanguage, MessageReaction) — resolves the deploy-time
migration that was infra-blocked from generating against the Neon pooler.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 01:21:35 +03:00
..