Skip to content

Commit 42dd53d

Browse files
committed
update cli update url
1 parent ed0694c commit 42dd53d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const (
1818
regionsEndpoint = "/paas/v1/zones"
1919
userEndpoint = "/g/user"
2020
updateEndpoint = "/update"
21-
updateServer = "https://cli.arvan.run"
21+
updateServer = "https://cli.arvanpaas.ir"
2222
)
2323

2424
// GetUserInfo returns a dictionary of user info if authentication credentials is valid.

pkg/config/config_info.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"errors"
55
"os"
66
"os/user"
7+
"strings"
78

89
"gopkg.in/yaml.v2"
910
)
@@ -31,7 +32,7 @@ type ConfigInfo struct {
3132

3233
// GetServer returns base url to access arvan api server
3334
func (c *ConfigInfo) GetServer() string {
34-
return c.server
35+
return strings.Replace(c.server, "arvancloud.com", "arvancloud.ir", -1)
3536
}
3637

3738
// GetApiKey returns an api key used to authorize request to arvan api server

pkg/paas/paas.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ func getArvanAuthorization() string {
322322
func getArvanPaasServerBase() string {
323323
arvanConfig := config.GetConfigInfo()
324324
arvanServer := arvanConfig.GetServer()
325-
arvanServer = strings.Replace(arvanServer, "arvancloud.com", "arvancloud.ir", 1)
326325
return arvanServer + paasUrlPostfix
327326
}
328327

0 commit comments

Comments
 (0)