progs/App4.js
changeset 178 13c6bd6e3477
parent 163 02026ee18378
child 530 6e08ee0d399d
--- a/progs/App4.js	Thu Sep 25 05:48:08 2014 +0100
+++ b/progs/App4.js	Thu Sep 25 06:43:43 2014 +0100
@@ -20,21 +20,20 @@
     var counter = parseInt(splits[0])
     var hash = splits[1]
     if (mk_hash(counter.toString() + salt) == hash) {
-	return counter
+        return counter
     } else {
-	return 0
+        return 0
     }
 }
 
-
 app.get('/', function(req, res){
     var counter = gt_cookie(req.cookies.counter) || 0;
     res.cookie('counter', mk_cookie(counter + 1));
     if (counter >= 5) {
-	res.write('You are a valued customer ' + 
-		  'visting the site ' + counter + ' times.');
+        res.write('You are a valued customer ' +
+                  'visting the site ' + counter + ' times.');
     } else {
-	res.write('This is visit number '+ counter +'!');
+        res.write('This is visit number '+ counter +'!');
     }
     res.end();
 });