Authentication and Authorization part 4- Authentication API cannot generate authTokens
http://localhost:9000/api/auth is not reachable error Cannot GET /api/auth. can only access http://localhost:9000/api/listings successfully through the backend.
Authentication and Authorization part 4- Authentication API cannot generate authTokens
http://localhost:9000/api/auth is not reachable error Cannot GET /api/auth. can only access http://localhost:9000/api/listings successfully through the backend.
When I try to post via POSTMAN
{
"email":"[email protected]",
“password”: “12345”
}
as a raw JSON to http://localhost:9000/api/auth
I get an error TypeError: schema.validate is not a function
at /Users/gerardocianciulli/Documents/done-with-it/backend/middleware/validation.js:4:25
at Layer.handle [as handle_request] (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/route.js:149:13)
at Route.dispatch (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/route.js:119:3)
at Layer.handle [as handle_request] (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/layer.js:95:5)
at /Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/index.js:284:15
at router.process_params (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/index.js:346:12)
at next (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/index.js:280:10)
at router.handle (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/index.js:175:3)
at router (/Users/gerardocianciulli/Documents/done-with-it/backend/node_modules/express/lib/router/index.js:47:12)