Browse Source

Demo: out comment route validator only-login

developer
Erik Römmelt 5 years ago
parent
commit
31ba4a0b8b
2 changed files with 1 additions and 15 deletions
  1. 1
    1
      server.js
  2. 0
    14
      server/dbs.js

+ 1
- 1
server.js View File

app.use(express.static(__dirname + '/public')); app.use(express.static(__dirname + '/public'));


// Other stuff is NOT authorized unless logged in // Other stuff is NOT authorized unless logged in
app.use (authorize.genCheckAuthorized ('user'));
//app.use (authorize.genCheckAuthorized ('user'));


// No error so far? Then it's a 404! // No error so far? Then it's a 404!
app.use(function (req, res, next) { app.use(function (req, res, next) {

+ 0
- 14
server/dbs.js View File

models: model, models: model,
}; };



/*
app.get ("/api/msg/search/:phrase", function (req, res) {
Message.find ({$text: {$search: req.params.phrase}) .then (function (err, results){
if (err) {
console.log (err);
res .status(404) .json (err);
} else {
console.log(JSON.stringify(results));
res.json(results);
}
});
});
*/
module.exports = dbs; module.exports = dbs;

Loading…
Cancel
Save