The req.query.isTeamMember is returned as a string. We should cast it (and other API query parameter string booleans) to a real boolean so that it doesn't trip anyone up in the future. This will also involve changing the parameters to the functions we call using the API query parameter string booleans.
To do this comprehensively, we should search across the project for instances of req.query.*. We should note where these variables are being used, cast them to booleans in the API callback functions, and modify the functions that use these variable so that they expect booleans rather than string booleans.
Some of the API routes expect query parameters to be present. For example, see the function associated with the
simNamesAndTitles
API route:https://github.com/phetsims/rosetta/blob/b1e931df1c9a2cb225da94ce423c65695a90fc52/src/server/translationApi/api/simNamesAndTitles.js#L19-L22
The
req.query.isTeamMember
is returned as a string. We should cast it (and other API query parameter string booleans) to a real boolean so that it doesn't trip anyone up in the future. This will also involve changing the parameters to the functions we call using the API query parameter string booleans.To do this comprehensively, we should search across the project for instances of
req.query.*
. We should note where these variables are being used, cast them to booleans in the API callback functions, and modify the functions that use these variable so that they expect booleans rather than string booleans.