Skip to content
Advertisement

Tag: postman

TypeError: Order.find is not a function

I am building ecommerce website using MERN stack. And I am getting error while testing using Postman. backend/controllers/user.js backend/models/Order.js backend/models/User.js backend/routes/user.js Error:- TypeError: Order.find is not a function at exports.userPurchaseList (C:UsersRahulMernBootcampprojbackendcontrollersuser.js:47:9) TESTING this route using POSTMAN. Answer You have exported an object so in your backend/controllers/user.js you could import it like so from destructuring from the object then the rest

postman: You need to enable JavaScript to run this app

I’ve got a new API from the backend team in a new project, when I call the api it returns “you need to enable java…”, whereas I had used Postman for another project before… is it related to api, server or something else? Answer I spent some times pondering on this trepidation.. and then suddenly i realized what was going

Why can’t I add a simple reusable function to Postman?

In Postman, I’m trying to achieve the following: In a collection: Create a utility object containing reusable functions Store that utility object in a global variable for later use in request test scripts. In a request: Pull the utility object code out of the global variables. Eval the code and store the resulting utility object instance in a local variable.

Advertisement