Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Feel free to **file a new issue** with a respective title and description on the

## ✅  Requirements

Requires a **Go version higher or equal to 1.11**.
Requires a **Go version higher or equal to 1.24**.

## 📘  License

Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Domofon",
"version": "0.3.6",
"version": "0.3.7",
"slug": "domofon",
"description": "",
"startup": "application",
Expand Down
10 changes: 10 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ type Config struct {
UUID string `json:"uuid"`
}

// Interface helpers for new auth layer
func (c *Config) GetRefreshToken() string { return c.RefreshToken }
func (c *Config) GetOperatorID() int { return c.Operator }
func (c *Config) GetUUID() string { return c.UUID }
func (c *Config) SetTokens(access, refresh string) error {
c.Token = access
c.RefreshToken = refresh
return c.WriteConfig()
}

// InitConfig ...
func InitConfig() *Config {
config := &Config{Port: 18000}
Expand Down
4 changes: 3 additions & 1 deletion handlers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"os"
"strings"
"time"

"github.com/ad/domru/internal/constants"
)

// HANetwork ...
Expand All @@ -28,7 +30,7 @@ func (h *Handler) HANetwork() (string, error) {
return "", fmt.Errorf("supervisor token not set")
}

url := API_HA_NETWORK
url := constants.HANetworkInfoURL

request, err := http.NewRequest("GET", url, nil)
if err != nil {
Expand Down
Loading