backend can serve UIDs
backend can serve UIDs

file:a/app.js -> file:b/app.js
--- a/app.js
+++ b/app.js
@@ -27,9 +27,12 @@
 			json: true
 		}, function (error, response, body) {
 			if (!error && response.statusCode === 200) {
-				if (body.url != app.urlcache) {
+				if (body.url && body.url != app.urlcache) {
 					beacon.advertiseUrl(body.url);
 					app.urlcache = body.url;
+				} else if (body.uid && body.uid != app.uidcache) {
+					beacon.advertiseUid(body.uid);
+					app.uidcache = body.uid;
 				}
 			}
 		});
@@ -39,4 +42,3 @@
 }
 
 module.exports = app
-

comments