Skip to content

Commit 70d4359

Browse files
committed
Update API host URLs from novotelecom.ru to proptech.ru
1 parent f7b9dfc commit 70d4359

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

handlers/auth.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (h *Handler) Accounts(username *string) (a []Account, err error) {
273273
request = request.WithContext(ctx)
274274

275275
rt := WithHeader(client.Transport)
276-
rt.Set("Host", "myhome.novotelecom.ru")
276+
rt.Set("Host", "myhome.proptech.ru")
277277
rt.Set("Content-Type", "application/json")
278278
rt.Set("Connection", "keep-alive")
279279
rt.Set("Accept", "*/*")
@@ -338,7 +338,7 @@ func (h *Handler) RequestCode(username *string, account Account) (result bool, e
338338
request = request.WithContext(ctx)
339339

340340
rt := WithHeader(client.Transport)
341-
rt.Set("Host", "myhome.novotelecom.ru")
341+
rt.Set("Host", "myhome.proptech.ru")
342342
rt.Set("Content-Type", "application/json")
343343
rt.Set("User-Agent", API_USER_AGENT)
344344
rt.Set("Connection", "keep-alive")
@@ -418,7 +418,7 @@ func (h *Handler) SendCode(r *http.Request) (authToken, refreshToken string, err
418418
request = request.WithContext(ctx)
419419

420420
rt := WithHeader(client.Transport)
421-
rt.Set("Host", "myhome.novotelecom.ru")
421+
rt.Set("Host", "myhome.proptech.ru")
422422
rt.Set("Content-Type", "application/json")
423423
rt.Set("User-Agent", API_USER_AGENT)
424424
rt.Set("Connection", "keep-alive")

handlers/const.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ const (
66

77
API_HA_NETWORK = "http://supervisor/network/info"
88

9-
API_AUTH_LOGIN = "https://myhome.novotelecom.ru/auth/v2/login/%s"
10-
API_AUTH_CONFIRMATION = "https://myhome.novotelecom.ru/auth/v2/confirmation/%s"
11-
API_AUTH_CONFIRMATION_SMS = "https://myhome.novotelecom.ru/auth/v2/auth/%s/confirmation"
9+
API_AUTH_LOGIN = "https://myhome.proptech.ru/auth/v2/login/%s"
10+
API_AUTH_CONFIRMATION = "https://myhome.proptech.ru/auth/v2/confirmation/%s"
11+
API_AUTH_CONFIRMATION_SMS = "https://myhome.proptech.ru/auth/v2/auth/%s/confirmation"
1212

1313
API_AUTH = "https://api-auth.domru.ru/v1/person/auth"
1414

15-
API_CAMERAS = "https://myhome.novotelecom.ru/rest/v1/forpost/cameras"
16-
API_OPEN_DOOR = "https://myhome.novotelecom.ru/rest/v1/places/%s/accesscontrols/%s/actions"
17-
API_FINANCES = "https://myhome.novotelecom.ru/rest/v1/subscribers/profiles/finances"
18-
API_SUBSCRIBER_PLACES = "https://myhome.novotelecom.ru/rest/v1/subscriberplaces"
19-
API_VIDEO_SNAPSHOT = "https://myhome.novotelecom.ru/rest/v1/places/%s/accesscontrols/%s/videosnapshots"
20-
API_CAMERA_GET_STREAM = "https://myhome.novotelecom.ru/rest/v1/forpost/cameras/%s/video"
21-
API_REFRESH_SESSION = "https://myhome.novotelecom.ru/auth/v2/session/refresh"
22-
API_EVENTS = "https://myhome.novotelecom.ru/rest/v1/places/%s/events?allowExtentedActions=true"
23-
API_OPERATORS = "https://myhome.novotelecom.ru/public/v1/operators"
15+
API_CAMERAS = "https://myhome.proptech.ru/rest/v1/forpost/cameras"
16+
API_OPEN_DOOR = "https://myhome.proptech.ru/rest/v1/places/%s/accesscontrols/%s/actions"
17+
API_FINANCES = "https://myhome.proptech.ru/rest/v1/subscribers/profiles/finances"
18+
API_SUBSCRIBER_PLACES = "https://myhome.proptech.ru/rest/v1/subscriberplaces"
19+
API_VIDEO_SNAPSHOT = "https://myhome.proptech.ru/rest/v1/places/%s/accesscontrols/%s/videosnapshots"
20+
API_CAMERA_GET_STREAM = "https://myhome.proptech.ru/rest/v1/forpost/cameras/%s/video"
21+
API_REFRESH_SESSION = "https://myhome.proptech.ru/auth/v2/session/refresh"
22+
API_EVENTS = "https://myhome.proptech.ru/rest/v1/places/%s/events?allowExtentedActions=true"
23+
API_OPERATORS = "https://myhome.proptech.ru/public/v1/operators"
2424
)
2525

2626
type Account struct {

0 commit comments

Comments
 (0)