mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-10-28 01:21:07 +01:00
refactor: change translation config
This commit is contained in:
parent
f3dec30b56
commit
f445fef85a
2 changed files with 10 additions and 7 deletions
|
|
@ -18,12 +18,12 @@ var TargetLanguages map[string]string
|
|||
func Init() {
|
||||
log.Info().Msg("Translation is enabled, creating HTTP client for DeepL API")
|
||||
baseURL := baseURLPro
|
||||
if config.BotConfig.DeepLFreeTier {
|
||||
if config.BotConfig.DeepL.FreeTier {
|
||||
baseURL = baseURLFree
|
||||
}
|
||||
|
||||
client = &apiClient{
|
||||
authKey: config.BotConfig.DeepLAPIKey,
|
||||
authKey: config.BotConfig.DeepL.APIKey,
|
||||
baseURL: baseURL,
|
||||
httpClient: &http.Client{Timeout: 30 * time.Second},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue