Skip to content

Commit

Permalink
Updated for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
trezorg committed Aug 8, 2020
1 parent 55c049a commit 253295c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ func prepareClient() (*http.Client, error) {

func (api *API) auth() error {
values := map[string]string{
"email": api.Email,
"password": api.Password,
"type": "login",
"successRedirectUrl": "",
"email": api.Email,
"password": api.Password,
}
jsonValue, err := json.Marshal(values)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
)

const (
authURL = "https://lingualeo.com/api/login"
translateURL = "https://api.lingualeo.com/gettranslates?port=1001"
addWordURL = "https://api.lingualeo.com/addword?port=1001"
authURL = "https://api.lingualeo.com/login"
translateURL = "https://api.lingualeo.com/getTranslates"
addWordURL = "https://api.lingualeo.com/addWord"
apiVersion = "1.0.1"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/translator/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ func getConfigFiles(filename *string) ([]string, error) {
if utils.FileExists(argsConfig) {
configs = append(configs, argsConfig)
}
configs = append(configs, argsConfig)
}
configs = utils.Unique(configs)
return configs, nil
Expand Down

0 comments on commit 253295c

Please sign in to comment.