Implemented Capture The Flag

This commit is contained in:
2019-06-16 03:14:12 +10:00
parent 3917aca276
commit c85f9a55a1
10 changed files with 111 additions and 41 deletions
+6
View File
@@ -46,6 +46,12 @@ const getBadgesOwned = (connection, id, cb) => {
ret[results[key].name] = { active: results[key].active };
});
//NOTE: check for "Capture The Flag" badge, force it to be the active badge
if ("Capture The Flag" in ret) {
Object.keys(ret).map((key) => ret[key].active = false);
ret["Capture The Flag"].active = true;
}
return cb(undefined, { 'owned': ret });
});
}