Closed RoguedBear closed 1 year ago
fixed it.
apparently it was happening because id
was of the type int
but input passed in from the query parameter was of type string
.
even though mongooose typecasts the input automatically, it does not use that result in $match
aggregate operator so we get a null result.
explicitly typecasting to integer if possible has fixed the issue (tho there is potential to improve this quick fix) in the teachers api and the subjects api as well
I'll take a look at it. thnx