Skip to content

Commit

Permalink
prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
gigobyte committed Mar 11, 2021
1 parent 3a2bf25 commit 23cfc2c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ module.exports = {
tabWidth: 2,
semi: false,
printWidth: 80,
singleQuote: true
singleQuote: true,
endOfLine: 'auto'
}
2 changes: 1 addition & 1 deletion src/endpoints/getEventByName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export const getEventByName = (config: HLTVConfig) => async ({
}

return HLTV.getEvent({ id: firstResult.id })
}
}
9 changes: 6 additions & 3 deletions src/endpoints/getMatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ export const getMatches = (config: HLTVConfig) => async ({
eventID,
eventType,
filter
}: GetMatchesArguments = {} ): Promise<(UpcomingMatch | LiveMatch)[]> => {
}: GetMatchesArguments = {}): Promise<(UpcomingMatch | LiveMatch)[]> => {
const query = stringify({
...(eventID ? { event: eventID } : {}),
...(eventType ? { eventType } : {}),
...(filter ? { predefinedFilter: filter } : {})
})

const $ = await fetchPage(`${config.hltvUrl}/matches?${query}`, config.loadPage)

const $ = await fetchPage(
`${config.hltvUrl}/matches?${query}`,
config.loadPage
)

checkForRateLimiting($)

Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/getTeamByName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export const getTeamByName = (config: HLTVConfig) => async ({
}

return HLTV.getTeam({ id: firstResult.id })
}
}

0 comments on commit 23cfc2c

Please sign in to comment.