Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

some stuff

  • Loading branch information...
commit 8335ef8dcab5253b190e3969de595148f13605f4 1 parent 458e408
Kamil authored November 19, 2012
4  app.js
... ...
@@ -1,12 +1,12 @@
1 1
 try {
2  
-  process.setgid("node");
  2
+  process.setgid("prismabox");
3 3
 }
4 4
 catch (err) {
5 5
   console.log("Setting Group failed");
6 6
 }
7 7
 
8 8
 try {
9  
-  process.setuid("node");
  9
+  process.setuid("prismabox");
10 10
 }
11 11
 catch (err) {
12 12
   console.log("Setting User failed");
6  config.js
@@ -16,6 +16,12 @@ module.exports = {
16 16
 		'00185650f586' : {
17 17
 			uploadkey: 'f3bc423f3bda7247e0807e844baebdcc', // required
18 18
 		},
  19
+                '001856519041' : {
  20
+                  uploadkey: '2c19819f8a9d9516af55d8f4567a4ce1'
  21
+               ,
  22
+                '001856519041' : {
  23
+                  uploadkey: '2c19819f8a9d9516af55d8f4567a4ce1'
  24
+                }}
19 25
 	},
20 26
 
21 27
 	// If you need help finding a bug just turn on debugging.
7  routes/index.js
@@ -35,7 +35,7 @@ exports.index = function(req, res){
35 35
 
36 36
 exports.upload = function(req, res) {
37 37
   var renderUpload = function(err, data) {
38  
-    var obj = data["SOAP-ENV:Body"]["ns1:UploadPhoto"];
  38
+    var obj = data["SOAP-ENV:Envelope"]["SOAP-ENV:Body"][0]["ns1:UploadPhoto"][0];
39 39
     var folder = config.folder;
40 40
     if(config.cards[obj.macaddress].folder) {
41 41
       folder = config.cards[obj.macaddress].folder;
@@ -133,7 +133,8 @@ exports.soap = function(req, res) {
133 133
   //StartSession
134 134
   //GetCardSettings
135 135
   var renderStartSession = function(err, data) {
136  
-    var obj = data["SOAP-ENV:Body"]["ns1:StartSession"];
  136
+    var obj = data["SOAP-ENV:Envelope"]["SOAP-ENV:Body"][0]["ns1:StartSession"][0];
  137
+    console.log(obj.macaddress);
137 138
     if(config.cards[obj.macaddress]) {
138 139
       var credential = md5HexDigest(obj.macaddress + obj.cnonce + config.cards[obj.macaddress].uploadkey);
139 140
       res.render('startSession', {layout:false, "credential": credential, "snonce":"d7eda40e374e8a34ee97554ebbfea0b5", "transfermodetimestamp": obj.transfermodetimestamp});  
@@ -141,7 +142,7 @@ exports.soap = function(req, res) {
141 142
   };
142 143
 
143 144
   var renderGetPhotoStatus = function(err, data) {
144  
-    var obj = data["SOAP-ENV:Body"]["ns1:GetPhotoStatus"];
  145
+    var obj = data["SOAP-ENV:Envelope"]["SOAP-ENV:Body"][0]["ns1:GetPhotoStatus"][0];
145 146
     if(config.cards[obj.macaddress]) {
146 147
       var credential = md5HexDigest(obj.macaddress + config.cards[obj.macaddress].uploadkey + "d7eda40e374e8a34ee97554ebbfea0b5");
147 148
       res.render('getPhotoStatus', {layout:false});

0 notes on commit 8335ef8

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