Skip to content

Commit

Permalink
common commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sumory committed May 10, 2012
2 parents 3391c17 + 5aae5ee commit ce05f59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions controller/message.js
Expand Up @@ -24,7 +24,7 @@ exports.create_message = function (type, user_id, content, cb){
*/
exports.batch_create_message = function (type, user_id, content, cb){
var create_at = Util.format_date(new Date());
common.get_all_followers(user_id, function(err, users){
common.get_all_followers(user_id, function(err, users){
async.forEach(users, function(user, callback) {
mysql.insert('insert into message(type, user_id, content, create_at) values(?,?,?,?)', [ type, user.id, content, create_at ], function(err, info) {
if (err) {
Expand Down Expand Up @@ -115,4 +115,4 @@ exports.mark_all_read = function(req, res, next){
res.redirect('/messages');
return;
});
};
};
6 changes: 3 additions & 3 deletions controller/vdisk/file.js
Expand Up @@ -46,14 +46,14 @@ exports.upload_file = function(req, res, next) {
var new_name = uid + time + ext;
var userDir = path.join(upload_path, uid);
ndir.mkdir(userDir, function(err) {
if (err){
if (err){
res.json({ state : 'falied'});
return;
}

var new_path = path.join(userDir, new_name);
fs.rename(file.path, new_path, function(err) {
if (err) {
if (err) {
res.json({ state : 'falied'});
return;
}
Expand Down Expand Up @@ -466,4 +466,4 @@ function file_user_info(files, func){
function(err,files) {
func(err,files);
});
}
}

0 comments on commit ce05f59

Please sign in to comment.