Skip to content
Browse files

[fix] Fix whitespace errors

  • Loading branch information...
1 parent 46438bc commit 93aadf19918665ad783bb21fc571dbac7c80200c @pksunkara pksunkara committed Sep 23, 2012
View
2 examples/app.js
@@ -4,7 +4,7 @@
* (C) 2012, Nodejitsu Inc.
*
*/
-
+
var flatiron = require('flatiron'),
fixtures = require('../test/fixtures'),
restful = require('../lib/restful'),
View
2 examples/server.js
@@ -4,7 +4,7 @@
* (C) 2012, Nodejitsu Inc.
*
*/
-
+
var http = require('http'),
fixtures = require('../test/fixtures'),
restful = require('../lib/restful'),
View
2 examples/standalone-server.js
@@ -4,7 +4,7 @@
* (C) 2012, Nodejitsu Inc.
*
*/
-
+
var fixtures = require('../test/fixtures'),
restful = require('../lib/restful');
View
14 lib/restful/controller.js
@@ -13,7 +13,7 @@ var controller = exports,
POST /:resource with or without parent
POST /:resource/:id with or without parent
POST /:resource/:id/:childResource with childID in req.body
- POST /:resource/:id/:childResource/:childID
+ POST /:resource/:id/:childResource/:childID
*/
//
@@ -22,7 +22,7 @@ var controller = exports,
controller.create = function (req, res, resource, optionsRef, respond) {
var options = utile.clone(optionsRef);
-
+
//
// Remark: We need to reserve the id "new" in order to make resource-routing work properly.
// I don't agree with this, but I'm not aware of a better solution solution.
@@ -38,7 +38,7 @@ controller.create = function (req, res, resource, optionsRef, respond) {
if (options._id && options._id !== "new") {
req.body.id = options._id.toString();
}
-
+
if (options.parent) {
//
@@ -47,7 +47,7 @@ controller.create = function (req, res, resource, optionsRef, respond) {
var parentField = options.parent.lowerResource + '_id';
var parentID = 0;
-
+
// either has id in the body, or sent in the route as the _id
if(typeof options._id !== 'undefined') {
parentID = options._id.toString();
@@ -65,16 +65,16 @@ controller.create = function (req, res, resource, optionsRef, respond) {
if (typeof req.body.id !== 'undefined' && options.childID === 'undefined') {
options._id = req.body.id;
- }
+ }
if (typeof options.childID !== 'undefined') {
req.body.id = options.childID;
}
-
+
if(typeof req.body[parentField] !== 'undefined') {
parentID = req.body[parentField];
}
-
+
options.parent.get(parentID, function(err, album) {
album['create' + resource._resource](req.body, function (err, result) {
req.restful.error = err;
View
6 test/fixtures/index.js
@@ -11,7 +11,7 @@ var http = require('http');
fixtures.Creature = resourceful.define('creature', function () {
var self = this;
-
+
this.restful = true;
//
// Specify a storage engine
@@ -99,14 +99,14 @@ fixtures.User = resourceful.define('user', function () {
fixtures.Album = resourceful.define('album', function () {
//this.use('couchdb', {database: "test3" })
this.restful = true;
-
+
this.use('memory');
this.string('title');
});
fixtures.Song = resourceful.define('song', function () {
this.restful = true;
-
+
//this.use('couchdb', {database: "test3" })
this.use('memory');
this.number('bpm');
View
2 test/flatiton-plugin-test.js
@@ -10,7 +10,7 @@ var vows = require('vows'),
APIeasy = require('api-easy'),
restful = require('../lib/restful'),
resourceful = require('resourceful'),
- http = require('http'),
+ http = require('http'),
fixtures = require('./fixtures'),
macros = require('./macros');
View
4 test/non-strict-api-test.js
@@ -1,10 +1,10 @@
/*
- * non-strict-api-test.js: Tests for non-strict `restful` routes
+ * non-strict-api-test.js: Tests for non-strict `restful` routes
*
* (C) 2012, Nodejitsu Inc.
*
*/
-
+
var vows = require('vows'),
assert = require('assert'),
APIeasy = require('api-easy'),
View
2 test/non-strict-type-validation-test.js
@@ -4,7 +4,7 @@
* (C) 2012, Nodejitsu Inc.
*
*/
-
+
var vows = require('vows'),
assert = require('assert'),
APIeasy = require('api-easy'),
View
2 test/relational/one-many-test.js
@@ -1,5 +1,5 @@
/*
- * one-many-test.js: Tests for one-many relational `restful` routes
+ * one-many-test.js: Tests for one-many relational `restful` routes
*
* (C) 2012, Nodejitsu Inc.
*
View
2 test/restful-api-test.js
@@ -1,5 +1,5 @@
/*
- * restful-api-test.js: Tests for purely `restful` routes
+ * restful-api-test.js: Tests for purely `restful` routes
*
* (C) 2012, Nodejitsu Inc.
*
View
2 test/restful-type-validation-test.js
@@ -4,7 +4,7 @@
* (C) 2012, Nodejitsu Inc.
*
*/
-
+
var vows = require('vows'),
assert = require('assert'),
APIeasy = require('api-easy'),

0 comments on commit 93aadf1

Please sign in to comment.
Something went wrong with that request. Please try again.