mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Make stricter jshint rules, convert tabs to spaces
This commit is contained in:
parent
99c13c02c0
commit
6da08eaf3c
5 changed files with 53 additions and 48 deletions
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"node": true,
|
||||
"browser": true,
|
||||
"undef": true
|
||||
"indent": 4,
|
||||
"trailing": true,
|
||||
"eqeqeq": true,
|
||||
"undef": true,
|
||||
"nomen": true,
|
||||
"white": true
|
||||
}
|
|
@ -40,8 +40,8 @@
|
|||
var posts = JSON.parse(data),
|
||||
post;
|
||||
|
||||
_.each(posts, function (_post) {
|
||||
post = new schema.models.Post(_post);
|
||||
_.each(posts, function (postData) {
|
||||
post = new schema.models.Post(postData);
|
||||
|
||||
post.preCreate(function () {
|
||||
post.save(function (error, data) {
|
||||
|
@ -112,8 +112,8 @@
|
|||
* @param post
|
||||
* @param callback
|
||||
*/
|
||||
DataProvider.prototype.posts.add = function (_post, callback) {
|
||||
var post = new schema.models.Post(_post);
|
||||
DataProvider.prototype.posts.add = function (postData, callback) {
|
||||
var post = new schema.models.Post(postData);
|
||||
|
||||
post.preCreate(function () {
|
||||
post.save(callback);
|
||||
|
@ -125,9 +125,9 @@
|
|||
* @param post
|
||||
* @param callback
|
||||
*/
|
||||
DataProvider.prototype.posts.edit = function (_post, callback) {
|
||||
schema.models.Post.findOne({where: {id: _post.id}}, function (error, post) {
|
||||
post = _.extend(post, _post);
|
||||
DataProvider.prototype.posts.edit = function (postData, callback) {
|
||||
schema.models.Post.findOne({where: {id: postData.id}}, function (error, post) {
|
||||
post = _.extend(post, postData);
|
||||
|
||||
schema.models.Post.updateOrCreate(post, callback);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue