Skip to content

Commit

Permalink
update to v1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhutu committed Jul 12, 2016
1 parent c7528be commit fe59fa9
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 24 deletions.
7 changes: 7 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### [查看Releases](https://github.com/jackhutu/jackblog-api-express/releases)

1.3.2 / 2016-07-12
==================
* 修复七牛错误
* 更新依赖包及相关代码

1.3.1 / 2016-04-30
==================
* 修复七牛没配置时首页图片API错误
Expand Down
Empty file added logs/development-error.log.0
Empty file.
Empty file added logs/development-error.log.1
Empty file.
12 changes: 12 additions & 0 deletions logs/test-error.log.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15951,"level":50,"msg":"登录密码错误 { username: 'test011462017778089@tets.com' }","time":"2016-04-30T12:03:00.298Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15951,"level":50,"msg":"登录用户名错误 { username: 'ttttt@ttttt.com' }","time":"2016-04-30T12:03:00.305Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15951,"level":50,"msg":"未验证用户登录 { username: 'test021462017778089@tets.com' }","time":"2016-04-30T12:03:00.351Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15951,"level":50,"msg":"被阻止登录 { username: 'test031462017778089@tets.com' }","time":"2016-04-30T12:03:00.401Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15992,"level":50,"msg":"登录密码错误 { username: 'test011462017814522@tets.com' }","time":"2016-04-30T12:03:36.496Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15992,"level":50,"msg":"登录用户名错误 { username: 'ttttt@ttttt.com' }","time":"2016-04-30T12:03:36.503Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15992,"level":50,"msg":"未验证用户登录 { username: 'test021462017814522@tets.com' }","time":"2016-04-30T12:03:36.557Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":15992,"level":50,"msg":"被阻止登录 { username: 'test031462017814522@tets.com' }","time":"2016-04-30T12:03:36.617Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":24693,"level":50,"msg":"登录密码错误 { username: 'test011462030073625@tets.com' }","time":"2016-04-30T15:27:55.932Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":24693,"level":50,"msg":"登录用户名错误 { username: 'ttttt@ttttt.com' }","time":"2016-04-30T15:27:55.940Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":24693,"level":50,"msg":"未验证用户登录 { username: 'test021462030073625@tets.com' }","time":"2016-04-30T15:27:55.990Z","v":0}
{"name":"hutublog","hostname":"hugongzideMacBook-Air.local","pid":24693,"level":50,"msg":"被阻止登录 { username: 'test031462030073625@tets.com' }","time":"2016-04-30T15:27:56.039Z","v":0}
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jackblog-api-express",
"version": "1.3.1",
"version": "1.3.2",
"description": "Jackblog API Express版",
"main": "server/app.js",
"scripts": {
Expand All @@ -23,45 +23,45 @@
},
"homepage": "https://github.com/jackhutu/jackblog-api-express#readme",
"dependencies": {
"bluebird": "^3.3.5",
"body-parser": "^1.15.0",
"bluebird": "^3.4.1",
"body-parser": "^1.15.2",
"bunyan": "^1.8.1",
"ccap": "^0.6.4",
"ccap": "^0.6.10",
"composable-middleware": "^0.3.0",
"compression": "^1.6.1",
"connect-redis": "^3.0.2",
"cookie-parser": "^1.4.1",
"compression": "^1.6.2",
"connect-redis": "^3.1.0",
"cookie-parser": "^1.4.3",
"cors": "^2.7.1",
"errorhandler": "^1.4.3",
"express": "^4.13.4",
"express-jwt": "^3.3.0",
"express-session": "^1.13.0",
"ioredis": "^1.15.1",
"jsonwebtoken": "^6.2.0",
"lodash": "^4.11.1",
"markdown-it": "^6.0.1",
"method-override": "^2.3.5",
"moment": "^2.13.0",
"mongoose": "^4.4.14",
"express": "^4.14.0",
"express-jwt": "^3.4.0",
"express-session": "^1.14.0",
"ioredis": "^2.2.0",
"jsonwebtoken": "^7.0.1",
"lodash": "^4.13.1",
"markdown-it": "^7.0.0",
"method-override": "^2.3.6",
"moment": "^2.14.1",
"mongoose": "^4.5.4",
"multer": "^1.1.0",
"passport": "^0.3.2",
"passport-github": "^1.1.0",
"passport-local": "^1.0.0",
"passport-qq": "0.0.3",
"passport-weibo": "^0.1.2",
"pm2": "^1.1.3",
"qiniu": "^6.1.10"
"qiniu": "^6.1.11"
},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-coveralls": "^0.1.4",
"gulp-env": "^0.4.0",
"gulp-istanbul": "^0.10.4",
"gulp-istanbul": "^1.0.0",
"gulp-mocha": "^2.2.0",
"gulp-nodemon": "^2.0.6",
"gulp-sequence": "^0.4.5",
"gulp-util": "^3.0.7",
"should": "^8.3.1",
"should": "^9.0.2",
"sinon": "^1.17.3",
"supertest": "^1.2.0"
}
Expand Down
2 changes: 2 additions & 0 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ fs.readdirSync(modelsPath).forEach(function (file) {
require(modelsPath + '/' + file);
}
});
//mongoose promise 风格
mongoose.Promise = global.Promise;

// 初始化数据
if(config.seedDB) { require('./config/seed'); }
Expand Down
9 changes: 9 additions & 0 deletions server/config/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ var all = {
ios:''
},
qrcode:'http://upload.jackhu.top/qrcode/jackblog-react-native-qrcode.png'
},
{
name:'Ionic 2.0',
gitUrl:'http://github.com/jackhutu/jackblog-ionic2',
downloadUrl:{
android:'http://upload.jackhu.top/downloads/Jackblog-ionic2-1.0.0.apk',
ios:''
},
qrcode:'http://upload.jackhu.top/qrcode/jackblog-ionic2-v1.0.0.png'
}
],
//开启第三方登录
Expand Down
10 changes: 6 additions & 4 deletions server/util/qiniu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ qiniu.conf.SECRET_KEY = config.qiniu.app_secret;
var client = new qiniu.rs.Client();

//对一般操作进行promise封装
var uploadFile = Promise.promisify(qiniu.io.putFile, qiniu.io);
var uploadFile = Promise.promisify(qiniu.io.putFile);
var moveFile = Promise.promisify(client.move, client);
var copyFile = Promise.promisify(client.copy, client);
var removeFile = Promise.promisify(client.remove, client);
var statFile = Promise.promisify(client.stat, client);
var fetchFile = Promise.promisify(client.fetch, client);
var allList = Promise.promisify(qiniu.rsf.listPrefix, qiniu.ref);
var allList = Promise.promisify(qiniu.rsf.listPrefix);

exports.uploadFile = uploadFile;
exports.moveFile = moveFile;
Expand Down Expand Up @@ -79,9 +79,11 @@ exports.remove = function(key){
列出所有资源,
prefix 想要查询的资源前缀缺省值为空字符串,limit 限制条数缺省值为1000
marker 上一次列举返回的位置标记,作为本次列举的起点信息。缺省值为空字符串
delimiter 指定目录分隔符,列出所有公共前缀(模拟列出目录效果)。默认值为空字符串。
*/
exports.list = function(prefix, marker, limit){
return this.allList(bucket, prefix, marker, limit).then(function(result){
exports.list = function(prefix, marker, limit, delimiter){
var delimiter = delimiter || '';
return this.allList(bucket, prefix, marker, limit, delimiter).then(function(result){
return result;
})
};

0 comments on commit fe59fa9

Please sign in to comment.