Skip to content

Commit

Permalink
Don't output debug for file create resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
signalpoint committed Aug 15, 2016
1 parent 7ea4874 commit b18dd45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ Drupal.services.call = function(options) {
// out any sensitive debug data containing passwords.
if (Drupal.settings.debug) {
var show = true;
if (options.service == 'user' &&
in_array(options.resource, ['login', 'create', 'update'])) {
show = false;
}
if (
(options.service == 'user' && in_array(options.resource, ['login', 'create', 'update'])) ||
(options.service == 'file' && options.resource == 'create')
) { show = false; }
if (show) {
if (typeof options.data === 'object') {
console.log(JSON.stringify(options.data));
Expand Down

0 comments on commit b18dd45

Please sign in to comment.