Skip to content

Commit

Permalink
some other last minute fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vecna committed Dec 21, 2016
1 parent b372ff8 commit f3ab467
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function debugTimeDiff(source, receivedTime) {
/* just to understand */
var Tlocal = moment();
var Tremote = moment(receivedTime);
debug(" Time difference %s ↓%s and %s = %s", source,
debug(" Time difference %s ↓%s and %s = %s", source,
Tlocal.format("HH:mm:SS"), Tremote.format("HH:mm:SS"),
moment.duration(Tremote - Tlocal).humanize() );
}
Expand Down Expand Up @@ -222,14 +222,16 @@ function processEvents(req) {
})
.then(function(supporter) {
if(!supporter || !_.isInteger(supporter.userId)) {
debug("UserId not found: *recording anyway*");
debug("UserId %d not found: *recording anyway*", headers.supporterId);
// throw new Error('user lookup - userId not found');
return {
'userId': headers.supporterId,
'protocolViolation': true
}
} else {
debug("UserId %d found", headers.supporterId);
return supporter;
}
return supporter;

// console.log(_.size(req.rawBody));
// debug("%d", _.size(supporter.publicKey));
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ var aggregate = function(cName, match, group) {
.toArray();
})
.tap(function(ret) {
debug("cName %j %j results in %d entries",
debug("aggregate %s [%j%j] result %d entries",
cName, match, group, _.size(ret));
});

Expand Down
1 change: 0 additions & 1 deletion lib/staticpages.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ var getRealityCheck = function(req) {
mongo.countByMatch(nconf.get('schema').timelines, {userId: userId})
])
.then(function(infos) {
utils.DUMP(infos);
user = _.head(_.head(infos));
timelinfo = _.head(_.tail(infos));

Expand Down
2 changes: 2 additions & 0 deletions sections/realitycheck/landing.jade
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ html
b accessible only by the supporter
|, access can be shared upon owner decisions.

// debug: #{timelines} #{distance} #{lastActivity} #{userId}
div.realitycontainer
table#listTable.display(cellspacing='0', width='100%')
thead
Expand Down
2 changes: 1 addition & 1 deletion sections/useit.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ block useit
p The collected data represent a publicly accessible knowledge you can download every week. We offer some basic visualisation intended to give awarness and critical judgement to the supporters:
ul.fb--icon-list
li Insight on your own timeline (this is one of
a(href="/realitycheck/100014305273231") mine
a(href="/realitycheck/100013962451936") mine
|)
li Insight about the promotional content you are exposed
li Analytics over the general behavior of the connected society
Expand Down

0 comments on commit f3ab467

Please sign in to comment.