Commit b705d9df authored by Aral Balkan's avatar Aral Balkan
Browse files

Changed the codes to two-word codes.

parent e67e78e9
......@@ -45,7 +45,7 @@ generateCodes = (fromId, toId) ->
count++
process.stdout.write 'Generating code #' + count + ' (ID: '+i+') \r'
code = hashids.encode i
code = hhgttgPicker.pick() + '-' + code
code = hhgttgPicker.pick() + '-' + hhgttgPicker.pick() + '-' + code
codes.push code
codes = codes.unique()
......@@ -57,15 +57,15 @@ generateCodes = (fromId, toId) ->
generateCodesAndSaveToFile = (fromId, toId, fileName) =>
codes = generateCodes fromId, toId
fs.writeFileSync fileName + '.json', JSON.stringify(codes)
fs.writeFileSync 'codes/' + fileName + '.json', JSON.stringify(codes)
#
# Generate waystone codes
#
teamFriendsAndFamilyCodes = generateCodesAndSaveToFile 1, 100, 'waystone-friends-and-family-access-codes'
tier1000Codes = generateCodesAndSaveToFile 101, 1100, 'waystone-tier-1000-access-codes'
tier100Codes = generateCodesAndSaveToFile 1101, 2100, 'waystone-tier-100-access-codes'
teamFriendsAndFamilyCodes = generateCodesAndSaveToFile 1, 100, 'friendsAndFamily'
tier1000Codes = generateCodesAndSaveToFile 101, 1100, 'tier1000'
tier100Codes = generateCodesAndSaveToFile 1101, 2100, 'tier100'
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment