Skip to content

Commit

Permalink
autofix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Nov 30, 2023
1 parent 0573fbf commit b7334cc
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 99 deletions.
8 changes: 4 additions & 4 deletions dev/cassandraRandom.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ let haveRows = 0;

async function start() {
// Get the current max_match_id from postgres, subtract 200000000
let max = (await db.raw(`select max(match_id) from public_matches`))
const max = (await db.raw("select max(match_id) from public_matches"))
?.rows?.[0]?.max;
let limit = max - 200000000;
const limit = max - 200000000;
while (true) {
// Test a random match ID
const rand = randomInteger(1, limit);

let result = await cassandra.execute(
`select match_id, player_slot, stuns from player_matches where match_id = ?`,
const result = await cassandra.execute(
"select match_id, player_slot, stuns from player_matches where match_id = ?",
[rand.toString()],
{
prepare: true,
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const group = args[0] || process.env.GROUP;

if (process.env.PROVIDER === "gce") {
cp.execSync(
'curl -H "Metadata-Flavor: Google" -L http://metadata.google.internal/computeMetadata/v1/project/attributes/env > /usr/src/.env'
"curl -H \"Metadata-Flavor: Google\" -L http://metadata.google.internal/computeMetadata/v1/project/attributes/env > /usr/src/.env"
);
}
if (process.env.ROLE) {
Expand Down
4 changes: 2 additions & 2 deletions routes/generateOperationId.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*This function will create operation IDs in the format:
/* This function will create operation IDs in the format:
`get_players_by_account_id` for the path: "/players/{account_id}"
`get_players_by_account_id_select_matches` for the path: "/players/{account_id}/matches".
*/
Expand All @@ -20,7 +20,7 @@ function generateOperationId(method, path) {
// If there are 3 elements in the path, prefix the last one with "select_"
if (segmentsWithParametersReplaced.length === 3) {
segmentsWithParametersReplaced[2] =
"select_" + segmentsWithParametersReplaced[2];
`select_${ segmentsWithParametersReplaced[2]}`;
}

// Join all segments with underscores
Expand Down
2 changes: 1 addition & 1 deletion routes/keyManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ keys
return res.sendStatus(200);
}
// returning customer
else if (allKeyRecords.length > 0) {
if (allKeyRecords.length > 0) {
customer_id = allKeyRecords[0].customer_id;

const invoices = await getOpenInvoices(customer_id);
Expand Down
4 changes: 2 additions & 2 deletions routes/responses/schemas/hero/HeroStatsResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module.exports = {
description: "night_vision",
type: "integer",
},
hero_id: commonProperties.hero_id, //TODO: Duplicate
hero_id: commonProperties.hero_id, // TODO: Duplicate
turbo_picks: {
description: "Picks in Turbo mode this month",
type: "integer",
Expand Down Expand Up @@ -216,7 +216,7 @@ module.exports = {
description: "Immortal wins",
type: "integer",
},
//TODO: Should the following remain in the response?
// TODO: Should the following remain in the response?
null_pick: {
description: "null_pick",
type: "integer",
Expand Down
Loading

0 comments on commit b7334cc

Please sign in to comment.