fix(backend): add validateparams to forums route guildid and slug

Merged
LU
5mo ago
+26-0

Summary

Added schema validation to the forum thread route to ensure malformed parameters don't reach Prisma. Follows the established validation pattern from other routes.

  • Added forumThreadSlugParam schema to management schemas
  • Wired validateParams middleware for guildId and slug parameters
  • Added test coverage for malformed guildId validation

Closes #1525


Summary by cubic

Add parameter validation to the forum thread route to block malformed guildId (snowflake) and slug before hitting Prisma. Prevents 500s and matches validation used in other routes.

  • Bug Fixes
    • Added forumThreadSlugParam to management schemas.
    • Applied validateParams to guildId and slug on GET /api/guilds/:guildId/threads/:slug.
    • Added tests for malformed guildId (400) and missing slug (404).