Skip to content

Commit

Permalink
allow pre:admin configuration. This allow more flexibility to customi…
Browse files Browse the repository at this point in the history
…se admin UI flow.
  • Loading branch information
gemscng committed Dec 31, 2016
1 parent 75c28d2 commit f51bc0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/createApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ module.exports = function createApp (keystone, express) {
// unless the headless option is set (which disables the Admin UI),
// bind the Admin UI's Dynamic Router
if (!keystone.get('headless')) {
if (typeof keystone.get('pre:admin') === 'function') {
keystone.get('pre:admin')(app);
}
app.use(function (req, res, next) {
keystone.callHook('pre:admin', req, res, next);
});
Expand Down

0 comments on commit f51bc0e

Please sign in to comment.