Skip to content

bug: Mentors page language filter is ignored (sends 'language' instead of 'languages') #297

Description

@yingliu-data

Bug Report

The mentors-page language filter is silently ignored because the frontend sends the wrong query-param name.

  • src/pages/api/mentors.ts:38-43 forwards the filter as language, but the backend binds @RequestParam List<CodeLanguage> languages (wcc-backend/.../controller/MentorshipPagesController.java:99).
  • Same file: mentorshipTypes is appended twice (lines 26-31 and 44-48), sending a duplicated param.

Reproduction

On src/pages/mentorship/mentors.tsx (line ~98) the user selects a language → request goes out as ?language=JAVA → the backend never binds it → the full, unfiltered mentor list renders as though the filter applied.

Severity

Medium

Potential Risk

  • The language filter appears functional but does nothing, misleading users.

Suggested Fix

  • Send the param as languages (matching the backend), supporting repeated/CSV values as the backend expects.
  • Remove the duplicate mentorshipTypes append.
  • Add a test asserting the outgoing request uses languages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions