Continuing on micro workers, and corrected some bugs

This commit is contained in:
Thomas FORGIONE
2015-09-29 17:22:48 +02:00
parent bee440668c
commit aa76fed43a
12 changed files with 149 additions and 13 deletions

View File

@@ -1,7 +1,13 @@
var hash = require('sha256');
var secretKey = require('../private.js').microSecretKey;
module.exports = function(campaignId, workerId) {
module.exports = function(workerId, campaignId) {
if (campaignId === undefined) {
return 'mw-dummyvcode';
}
return 'mw-' + hash(campaignId + workerId + secretKey);