Skip to content

Commit 1acf25f

Browse files
committed
Linting changes
1 parent 69098fc commit 1acf25f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/generators/ctfd.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ function createCtfdExport (challenges, { insertHints, insertHintUrls, insertHint
4040
}
4141
*/
4242

43-
// In the flags section of the returned data we iterate through the result of string splitting by comma, and compute the hash of the single flag key + challenge name.
44-
// Format expected is: challenge3,challenge description,category3,100,dynamic,visible,0,"flag1,flag2,flag3","tag1,tag2,tag3","hint1,hint2,hint3","{""initial"":100, ""minimum"":10, ""decay"":10}"
45-
// If we provide a single key with no commas, we do not incapsulate the output in a "" pair.
46-
return new Promise((resolve, reject) => {
43+
// In the flags section of the returned data we iterate through the result of string splitting by comma, and compute the hash of the single flag key + challenge name.
44+
// Format expected is: challenge3,challenge description,category3,100,dynamic,visible,0,"flag1,flag2,flag3","tag1,tag2,tag3","hint1,hint2,hint3","{""initial"":100, ""minimum"":10, ""decay"":10}"
45+
// If we provide a single key with no commas, we do not incapsulate the output in a "" pair.
46+
return new Promise((resolve, reject) => {
4747
try {
4848
const data = []
4949
for (const key in challenges) {
@@ -58,7 +58,7 @@ function createCtfdExport (challenges, { insertHints, insertHintUrls, insertHint
5858
type: 'standard',
5959
state: 'visible',
6060
max_attempts: 0,
61-
flags: ctfKey.split(",").length === 1 ? hmacSha1(ctfKey, challenge.name) : `"${ctfKey.split(",").map(key => `${hmacSha1(key, challenge.name)}`).join(",")}"` ,
61+
flags: ctfKey.split(',').length === 1 ? hmacSha1(ctfKey, challenge.name) : `"${ctfKey.split(',').map(key => `${hmacSha1(key, challenge.name)}`).join(',')}"`,
6262
tags: challenge.tags ? `"${challenge.tags}"` : '',
6363
hints: insertChallengeHints(challenge),
6464
// hint_cost: insertChallengeHintCosts(challenge),

0 commit comments

Comments
 (0)