TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 at NativeConnection.Connection.openUri (/home/admin/BackEnd/node_modules/mongoose/lib/connection.js:830:32) at Mongoose.connect (/home/admin/BackEnd/node_modules/mongoose/lib/index.js:335:15) at Object. (/home/admin/BackEnd/app.js:85:10) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:32:23) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47 { reason: TopologyDescription { type: 'Single', setName: null, maxSetVersion: null, maxElectionId: null, servers: Map { 'localhost:27017' => [ServerDescription] }, stale: false, compatible: true, compatibilityError: null, logicalSessionTimeoutMinutes: null, heartbeatFrequencyMS: 10000, localThresholdMS: 15, commonWireVersion: null } } MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 at NativeConnection.Connection.openUri (/home/admin/BackEnd/node_modules/mongoose/lib/connection.js:830:32) at Mongoose.connect (/home/admin/BackEnd/node_modules/mongoose/lib/index.js:335:15) at Object. (/home/admin/BackEnd/app.js:85:10) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:32:23) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47 { reason: TopologyDescription { type: 'Single', setName: null, maxSetVersion: null, maxElectionId: null, servers: Map { 'localhost:27017' => [ServerDescription] }, stale: false, compatible: true, compatibilityError: null, logicalSessionTimeoutMinutes: null, heartbeatFrequencyMS: 10000, localThresholdMS: 15, commonWireVersion: null } } TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) TypeError: cursor.each is not a function at /home/admin/BackEnd/passport-config.js:46:22 at new Promise () at Strategy.authenticateAdmin [as _verify] (/home/admin/BackEnd/passport-config.js:44:40) at Strategy.authenticate (/home/admin/BackEnd/node_modules/passport-local/lib/strategy.js:90:12) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16) at authenticate (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:367:7) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at next (/home/admin/BackEnd/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/admin/BackEnd/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/admin/BackEnd/node_modules/express/lib/router/layer.js:95:5) at /home/admin/BackEnd/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/admin/BackEnd/node_modules/express/lib/router/index.js:335:12) at next (/home/admin/BackEnd/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:343:9) at SessionStrategy.authenticate (/home/admin/BackEnd/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/home/admin/BackEnd/node_modules/passport/lib/middleware/authenticate.js:366:16)