"message":"Cannot access member 'resultsPerPage' of undefined","name":"TypeError"

I am new to MongoD trying to learn realm. I just tried to create an HTTP Endpoint through this function (I’ve attached the screenshot below), I can’t understant the error when I have already defined it.

Thanks in advance.