aboutsummaryrefslogtreecommitdiffstats
path: root/src/nodejs
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-01-28 15:07:29 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2011-01-28 15:07:29 +0100
commit6a1fa18a04dfd3ef87a7386fe0f4a6a8f4d81149 (patch)
treef90494e452536daa85c52ebb00805a94a912e55c /src/nodejs
parente32ec046ef0588595cf0ada37ac0f9a6e994d534 (diff)
downloadosm-xapi-6a1fa18a04dfd3ef87a7386fe0f4a6a8f4d81149.tar.gz
osm-xapi-6a1fa18a04dfd3ef87a7386fe0f4a6a8f4d81149.tar.xz
osm-xapi-6a1fa18a04dfd3ef87a7386fe0f4a6a8f4d81149.zip
remove trailing whitespaces
Diffstat (limited to 'src/nodejs')
-rw-r--r--src/nodejs/response.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/nodejs/response.js b/src/nodejs/response.js
index 9a92c66..b7fdd85 100644
--- a/src/nodejs/response.js
+++ b/src/nodejs/response.js
@@ -2,68 +2,68 @@ var xmlGen = require('./xmlGenerator');
// FIXME: this is a total mess
exports.mkJsonRes = function mkJsonRes(res){
res.started = false;
- res.atStart = function (){
+ res.atStart = function (){
if(!this.started){
this.writeHead(200);
this.write('json start start');
this.started = true;
- }
- }
+ }
+ }
res.atEnd = function(){
if(!this.started){
this.atStart(pojo);
- }
+ }
this.write('json enden');
this.end();
- }
+ }
res.putNode = function (pojo){
if(!this.started){
this.atStart(pojo);
- }
+ }
this.write(JSON.stringify(pojo));
- }
+ }
res.endWith500 = function(){
this.writeHead(500);
this.end();
- }
+ }
return res;
}
exports.mkXmlRes = function (res){
res.started = false;
- res.atStart = function (){
+ res.atStart = function (){
if(!this.started){
this.writeHead(200);
this.write('<xml>');
this.started = true;
- }
- }
+ }
+ }
res.atEnd = function(){
if(!this.started){
this.atStart();
- }
+ }
this.write('</xml>');
this.end();
- }
+ }
res.putWay = function (pojo){
if(!this.started){
this.atStart(pojo);
- }
+ }
this.write(xmlGen.createWay(pojo));
- }
+ }
res.putNode = function (pojo){
if(!this.started){
this.atStart(pojo);
- }
+ }
this.write(xmlGen.createNode(pojo));
- }
+ }
res.endWith500 = function(){
this.writeHead(500);
this.end();
- }
+ }
return res;
}