Skip to content

Commit

Permalink
replace emoji to empty , mysql unsupported emoji code
Browse files Browse the repository at this point in the history
  • Loading branch information
caihuiji committed Sep 13, 2016
1 parent 849fd99 commit 0374010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dao/StatisticsDao.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module.exports = function (db){
projectId : Number,
startDate : Date,
endDate : Date,
content : Number,
content : String,
total : Number
});

return Statistics;
}
}
2 changes: 2 additions & 0 deletions service/StatisticsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ StatisticsService.prototype = {
}).on('end', function() {
var saveModel = {};
try {
//replace emoji to empty , mysql unsupported emoji code
buffer=buffer.replace(/\ud83d[\udc00-\udfff]/gi , "")
var result = JSON.parse(buffer);

_.forEach(result.item, function(value, key) {
Expand Down

0 comments on commit 0374010

Please sign in to comment.