diff --git a/core/server/api/db.js b/core/server/api/db.js index 389ae59a0f..1c2ef1c716 100644 --- a/core/server/api/db.js +++ b/core/server/api/db.js @@ -12,7 +12,7 @@ var Ghost = require('../../ghost'), db; db = { - export: function (req, res) { + 'export': function (req, res) { /*jslint unparam:true*/ return dataExport().then(function (exportedData) { // Save the exported data to the file system for download @@ -38,7 +38,8 @@ db = { }); }); }, - import: function (req, res) { + 'import': function (req, res) { + var notification; if (!req.files.importfile || req.files.importfile.size === 0 || req.files.importfile.name.indexOf('json') === -1) { /** @@ -49,7 +50,7 @@ db = { * - If the size is 0 * - If the name doesn't have json in it */ - var notification = { + notification = { type: 'error', message: "Must select a .json file to import", status: 'persistent', @@ -124,7 +125,7 @@ db = { }); }) .then(function importSuccess() { - var notification = { + notification = { type: 'success', message: "Data imported. Log in with the user details you imported", status: 'persistent', @@ -141,7 +142,7 @@ db = { }, function importFailure(error) { // Notify of an error if it occurs - var notification = { + notification = { type: 'error', message: error.message || error, status: 'persistent', @@ -152,7 +153,7 @@ db = { res.redirect('/ghost/debug/'); }); }); - }, + } }; module.exports.db = db; diff --git a/core/server/controllers/frontend.js b/core/server/controllers/frontend.js index a1c88dedb2..570353b412 100644 --- a/core/server/controllers/frontend.js +++ b/core/server/controllers/frontend.js @@ -122,7 +122,7 @@ frontendControllers = { title: _.escape(post.title), guid: post.uuid, url: siteUrl + '/' + post.slug + '/', - date: post.published_at, + date: post.published_at }, content = post.html; diff --git a/core/server/data/migration/000.js b/core/server/data/migration/000.js index f61fcbe343..322e592c68 100644 --- a/core/server/data/migration/000.js +++ b/core/server/data/migration/000.js @@ -23,7 +23,7 @@ var when = require('when'), updated_at: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true}, published_at: {maxlength: 0, nullable: true}, - published_by: {maxlength: 0, nullable: true}, + published_by: {maxlength: 0, nullable: true} }, users: { id: {maxlength: 0, nullable: false}, @@ -46,7 +46,7 @@ var when = require('when'), created_at: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false}, updated_at: {maxlength: 0, nullable: true}, - updated_by: {maxlength: 0, nullable: true}, + updated_by: {maxlength: 0, nullable: true} }, roles: { id: {maxlength: 0, nullable: false}, @@ -56,12 +56,12 @@ var when = require('when'), created_at: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false}, updated_at: {maxlength: 0, nullable: true}, - updated_by: {maxlength: 0, nullable: true}, + updated_by: {maxlength: 0, nullable: true} }, roles_users: { id: {maxlength: 0, nullable: false}, role_id: {maxlength: 0, nullable: false}, - user_id: {maxlength: 0, nullable: false}, + user_id: {maxlength: 0, nullable: false} }, permissions: { id: {maxlength: 0, nullable: false}, @@ -73,17 +73,17 @@ var when = require('when'), created_at: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false}, updated_at: {maxlength: 0, nullable: true}, - updated_by: {maxlength: 0, nullable: true}, + updated_by: {maxlength: 0, nullable: true} }, permissions_users: { id: {maxlength: 0, nullable: false}, user_id: {maxlength: 0, nullable: false}, - permission_id: {maxlength: 0, nullable: false}, + permission_id: {maxlength: 0, nullable: false} }, permissions_roles: { id: {maxlength: 0, nullable: false}, role_id: {maxlength: 0, nullable: false}, - permission_id: {maxlength: 0, nullable: false}, + permission_id: {maxlength: 0, nullable: false} }, settings: { id: {maxlength: 0, nullable: false}, @@ -94,7 +94,7 @@ var when = require('when'), created_at: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false}, updated_at: {maxlength: 0, nullable: true}, - updated_by: {maxlength: 0, nullable: true}, + updated_by: {maxlength: 0, nullable: true} }, tags: { id: {maxlength: 0, nullable: false}, @@ -108,12 +108,12 @@ var when = require('when'), created_at: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false}, updated_at: {maxlength: 0, nullable: true}, - updated_by: {maxlength: 0, nullable: true}, + updated_by: {maxlength: 0, nullable: true} }, posts_tags: { id: {maxlength: 0, nullable: false}, post_id: {maxlength: 0, nullable: false}, - tag_id: {maxlength: 0, nullable: false}, + tag_id: {maxlength: 0, nullable: false} } }; diff --git a/package.json b/package.json index b730b6fae2..ee44c6dd86 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "grunt-contrib-watch": "~0.5.3", "grunt-express-server": "~0.4.2", "grunt-groc": "~0.3.0", - "grunt-jslint": "~1.0.0", + "grunt-jslint": "~1.1.1", "grunt-mocha-cli": "~1.0.6", "grunt-open": "~0.2.2", "grunt-shell": "~0.3.1",