Skip to content

Instantly share code, notes, and snippets.

@jstrimpel
Last active August 29, 2015 14:09
Show Gist options
  • Save jstrimpel/97fc8146adb1f3bea425 to your computer and use it in GitHub Desktop.
Save jstrimpel/97fc8146adb1f3bea425 to your computer and use it in GitHub Desktop.
lazo application filters example
define(['lazoApp', 'app/filters/auth'], function (LazoApp, authFilter) {
'use strict';
return LazoApp.extend({
initialize: function (callback) {
LAZO.app.addRequestFilter('.*', authFilter);
callback();
}
});
});
// app/filters/auth.js
define(function () {
'use strict';
return function (path, params, ctx, options) {
console.log('filter');
options.success();
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment