Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
feat(core): change console in angular to (#1551)
Browse files Browse the repository at this point in the history
logs with $log in client idea proposed by @simison
also removed unnecessary consoles in users.password.server.controller.js

Fixes #1541
  • Loading branch information
itelo authored and mleanos committed Oct 9, 2016
1 parent 6be12f8 commit 4aa5d77
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions modules/articles/client/services/articles.client.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
.module('articles.services')
.factory('ArticlesService', ArticlesService);

ArticlesService.$inject = ['$resource'];
ArticlesService.$inject = ['$resource', '$log'];

function ArticlesService($resource) {
function ArticlesService($resource, $log) {
var Article = $resource('api/articles/:articleId', {
articleId: '@_id'
}, {
Expand Down Expand Up @@ -47,7 +47,7 @@

function handleError(error) {
// Log error
console.log(error);
$log.error(error);
}
}
}());
6 changes: 4 additions & 2 deletions modules/core/client/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@
.module(app.applicationModuleName)
.config(bootstrapConfig);

function bootstrapConfig($compileProvider, $locationProvider, $httpProvider) {
bootstrapConfig.$inject = ['$compileProvider', '$locationProvider', '$httpProvider', '$logProvider'];

function bootstrapConfig($compileProvider, $locationProvider, $httpProvider, $logProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');

$httpProvider.interceptors.push('authInterceptor');

// Disable debug data for production environment
// @link https://docs.angularjs.org/guide/production
$compileProvider.debugInfoEnabled(app.applicationEnvironment !== 'production');
$logProvider.debugEnabled(app.applicationEnvironment !== 'production');
}

bootstrapConfig.$inject = ['$compileProvider', '$locationProvider', '$httpProvider'];

// Then define the init function for starting up the application
angular.element(document).ready(init);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ exports.forgot = function (req, res, next) {
httpTransport = 'https://';
}
var baseUrl = req.app.get('domain') || httpTransport + req.headers.host;
console.log(baseUrl);
res.render(path.resolve('modules/users/server/templates/reset-password-email'), {
name: user.displayName,
appName: config.app.title,
url: baseUrl + '/api/auth/reset/' + token
}, function (err, emailHTML) {
console.log(emailHTML);
done(err, emailHTML, user);
});
},
Expand Down

0 comments on commit 4aa5d77

Please sign in to comment.