mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
latest changes
This commit is contained in:
@ -27,6 +27,8 @@ module.exports = function(app, passport) {
|
||||
log.setPrefix("[%d] %l ");
|
||||
log.info("User Logged In: %s %s", user.name.first, user.name.last);
|
||||
|
||||
res.cookie('atlbid', JSON.stringify(user._id), {signed:true});
|
||||
|
||||
if (req.session.redirectUrl) {
|
||||
redirectUrl = req.session.redirectUrl;
|
||||
req.session.redirectUrl = null;
|
||||
|
@ -10,7 +10,7 @@ module.exports = function(app, config, passport, piler) {
|
||||
|
||||
app.configure(function() {
|
||||
// cookieParser should be above session
|
||||
app.use(express.cookieParser());
|
||||
app.use(express.cookieParser("atlbsecret"));
|
||||
|
||||
// bodyParser should be above methodOverride
|
||||
app.use(express.bodyParser());
|
||||
@ -37,4 +37,4 @@ module.exports = function(app, config, passport, piler) {
|
||||
// // enable live update in development mode.
|
||||
// piler.liveUpdate();
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ module.exports = function(app, auth, piler, calendar, directory, config) {
|
||||
piler.addJsFile("/js/lib/bootstrap-datepicker.js");
|
||||
piler.addJsFile("/js/lib/dialog.js");
|
||||
piler.addJsFile("/js/lib/select2.js");
|
||||
piler.addJsFile("/js/lib/dropzone.js");
|
||||
piler.addJsFile("/js/app.js");
|
||||
piler.addJsFile("/js/controllers.js");
|
||||
piler.addJsFile("/js/directives.js");
|
||||
@ -21,6 +22,14 @@ module.exports = function(app, auth, piler, calendar, directory, config) {
|
||||
|
||||
app.all('/api/*', auth.requiresApiAccess);
|
||||
|
||||
var posts = require('../app/controllers/posts');
|
||||
app.get('/api/posts', posts.index);
|
||||
app.get('/api/posts/:post_id', posts.get);
|
||||
app.post('/api/posts', posts.create);
|
||||
app.post('/api/posts/upload', posts.upload);
|
||||
app.post('/api/posts/:post_id', posts.update);
|
||||
app.del('/api/posts/:post_id', posts.destroy);
|
||||
|
||||
var clients = require('../app/controllers/clients');
|
||||
app.get('/api/clients', clients.index);
|
||||
app.get('/api/clients/frequencies', clients.frequencies);
|
||||
@ -60,6 +69,8 @@ module.exports = function(app, auth, piler, calendar, directory, config) {
|
||||
var clock = require('../app/controllers/clock')(piler);
|
||||
app.post('/api/clock', clock.post);
|
||||
|
||||
var site = require('../app/controllers/site')(piler);
|
||||
|
||||
var login = require('../app/controllers/login')(piler);
|
||||
app.get('/login', login.login);
|
||||
app.get('/login/error', login.error);
|
||||
@ -67,6 +78,6 @@ module.exports = function(app, auth, piler, calendar, directory, config) {
|
||||
|
||||
var home = require('../app/controllers/home')(piler);
|
||||
|
||||
app.get('/', tags.index, auth.requiresUiLogin, clock.index, home.index);
|
||||
app.get('*', tags.index, auth.requiresUiLogin, clock.index, home.index);
|
||||
app.get('/', tags.index, auth.requiresUiLogin, clock.index, site.index, home.index);
|
||||
app.get('*', tags.index, auth.requiresUiLogin, clock.index, site.index, home.index);
|
||||
};
|
||||
|
Reference in New Issue
Block a user