Use regex to match app_install patch in sam.before

This commit is contained in:
opi 2014-02-21 15:24:54 +01:00
parent 7d1b4a9c72
commit 97b6d59d90

View file

@ -221,14 +221,14 @@ app = Sammy('#main', function (sam) {
* Filters
*
*/
sam.before(['#/apps/install/:app'], function (req){
sam.before(/apps\/install\//, function (req){
// Preload domains list.
req.params.domains = [];
req.api('/domains', function(data) {
req.params.domains = data.Domains;
});
});
sam.before(['#/apps/install/:app'], function (req){
sam.before(/apps\/install\//, function (req){
// Preload users lists.
req.params.users = [];
req.api('/users', function(data) {