chore: minor
This commit is contained in:
parent
e43e2154d8
commit
6767246fa3
2 changed files with 8 additions and 9 deletions
2
go.mod
2
go.mod
|
|
@ -34,7 +34,6 @@ require (
|
|||
github.com/fatih/structs v1.1.0
|
||||
github.com/glebarez/sqlite v1.11.0
|
||||
github.com/go-http-utils/etag v0.0.0-20161124023236-513ea8f21eb1
|
||||
github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a
|
||||
github.com/go-playground/validator/v10 v10.24.0
|
||||
github.com/go-telegram/bot v1.13.3
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1
|
||||
|
|
@ -135,6 +134,7 @@ require (
|
|||
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
|
||||
github.com/glebarez/go-sqlite v1.22.0 // indirect
|
||||
github.com/go-http-utils/fresh v0.0.0-20161124030543-7231e26a4b27 // indirect
|
||||
github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
|
||||
"github.com/evcc-io/evcc/util"
|
||||
"github.com/evcc-io/evcc/util/request"
|
||||
"github.com/go-http-utils/headers"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
|
|
@ -50,9 +49,9 @@ func (v *API) Vehicles() ([]string, error) {
|
|||
uri := fmt.Sprintf("%s/%s", ApiBaseUrl, VehicleGuidPath)
|
||||
|
||||
req, err := request.New(http.MethodGet, uri, nil, map[string]string{
|
||||
headers.Accept: request.JSONContent,
|
||||
"x-guid": v.identity.uuid,
|
||||
"x-api-key": ApiKey,
|
||||
"Accept": request.JSONContent,
|
||||
"x-guid": v.identity.uuid,
|
||||
"x-api-key": ApiKey,
|
||||
})
|
||||
var resp Vehicles
|
||||
if err == nil {
|
||||
|
|
@ -69,10 +68,10 @@ func (v *API) Status(vin string) (Status, error) {
|
|||
uri := fmt.Sprintf("%s/%s", ApiBaseUrl, RemoteElectricStatusPath)
|
||||
|
||||
req, err := request.New(http.MethodGet, uri, nil, map[string]string{
|
||||
headers.Accept: request.JSONContent,
|
||||
"x-guid": v.identity.uuid,
|
||||
"x-api-key": ApiKey,
|
||||
"vin": vin,
|
||||
"Accept": request.JSONContent,
|
||||
"x-guid": v.identity.uuid,
|
||||
"x-api-key": ApiKey,
|
||||
"vin": vin,
|
||||
})
|
||||
var status Status
|
||||
if err == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue