mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Minimize log for engine
This commit is contained in:
parent
efbeb4bfcb
commit
92c6695d99
1 changed files with 7 additions and 14 deletions
21
vendor/assets/javascripts/paloma/engine.js
vendored
21
vendor/assets/javascripts/paloma/engine.js
vendored
|
@ -12,26 +12,19 @@
|
|||
this._lastRequest = this._request;
|
||||
|
||||
var resource = this._request.controller,
|
||||
Controller = this.factory.get(resource);
|
||||
|
||||
if ( !Controller )
|
||||
return this._stopWithWarning(
|
||||
'Paloma: undefined controller -> ' + resource
|
||||
);
|
||||
|
||||
var controller = new Controller( this._request.params ),
|
||||
action = this._request.action,
|
||||
params = this._request.params;
|
||||
|
||||
if ( !controller[action] )
|
||||
return this._stopWithWarning(
|
||||
'Paloma: undefined action <' + action + '> for <' +
|
||||
resource + '> controller'
|
||||
);
|
||||
var Controller = this.factory.get(resource),
|
||||
controller = null;
|
||||
|
||||
Paloma.log('Paloma: Execute ' + resource + '#' + action + ' with');
|
||||
Paloma.log('Paloma: ' + resource + '#' + action + ' with params:');
|
||||
Paloma.log(params);
|
||||
|
||||
if ( !Controller ) return true;
|
||||
controller = new Controller(params);
|
||||
|
||||
if ( !controller[action] ) return true;
|
||||
controller[action]();
|
||||
|
||||
this._lastRequest.executed = true;
|
||||
|
|
Loading…
Reference in a new issue