Commit cb2c4e85e48710e8b33df855693e166fe7cfee24
1 parent
67f1e4317d
Exists in
master
code review
Showing
1 changed file
with
3 additions
and
7 deletions
Show diff stats
src/js/app.js
| ... | ... | @@ -2,7 +2,7 @@ angular.module('focaSqlite', []) |
| 2 | 2 | .factory('focaSqliteService', [ |
| 3 | 3 | function() { |
| 4 | 4 | function error(error) { |
| 5 | - console.log(error); | |
| 5 | + console.error(error); | |
| 6 | 6 | } |
| 7 | 7 | return { |
| 8 | 8 | openDataBase: function() { |
| ... | ... | @@ -20,9 +20,7 @@ angular.module('focaSqlite', []) |
| 20 | 20 | "PRIMARY KEY(route, body, type))"; |
| 21 | 21 | this.db.transaction(function(tx) { |
| 22 | 22 | tx.executeSql(queryCreate); |
| 23 | - }, function(error) { | |
| 24 | - console.log(error); | |
| 25 | - }); | |
| 23 | + }, error); | |
| 26 | 24 | }, |
| 27 | 25 | updateQuery: function(route, body, type, response, success) { |
| 28 | 26 | var query = 'INSERT OR REPLACE INTO querys (route, type, body, response)' + |
| ... | ... | @@ -32,9 +30,7 @@ angular.module('focaSqlite', []) |
| 32 | 30 | ", '" + response + "')"; |
| 33 | 31 | this.db.transaction(function(tx) { |
| 34 | 32 | tx.executeSql(query); |
| 35 | - }, function(error) { | |
| 36 | - console.log(error); | |
| 37 | - }, success) | |
| 33 | + }, error, success) | |
| 38 | 34 | }, |
| 39 | 35 | getQuery: function(route, body, type, success) { |
| 40 | 36 | var query= "SELECT * FROM querys " + |