Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use token map for storing multiple tokens

Neeraj Gupta40acd1d22640
diff --git a/internal/api/client.go b/internal/api/client.go
index fde874bd46..9b86a590e5 100644
--- a/internal/api/client.go
+++ b/internal/api/client.go
@@ -18,7 +18,7 @@ var (
type Client struct {
restClient *resty.Client
- authToken *string
+ tokenMap map[string]string
}
type Params struct {
@@ -63,5 +63,10 @@ func NewClient(p Params) *Client {
}
return &Client{
restClient: enteAPI,
+ tokenMap: make(map[string]string),
}
}
+
+func (c *Client) AddToken(id string, token string) {
+ c.tokenMap[id] = token
+}