Skip to content

Commit e92ead3

Browse files
authored
Switch to new api.zeabur.com (#117)
#### Description (required) Use `api.zeabur.com`. `gateway.zeabur.com` is migrating and some stuff (for example, API token) are not working. - **fix(api): Use ZeaburServerURL constant** - **feat(constant): Switch to new API endpoint** #### Related issues & labels (optional) - Quick workaround of SUP-1430 - Suggested label: bug
2 parents ba799ed + 6e78aad commit e92ead3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/api/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"time"
1212

1313
"github.com/spf13/viper"
14+
"github.com/zeabur/cli/pkg/constant"
1415
"github.com/zeabur/cli/pkg/model"
1516
)
1617

@@ -382,7 +383,7 @@ func (c *client) CreateEmptyService(ctx context.Context, projectID string, name
382383
}
383384

384385
func (c *client) UploadZipToService(ctx context.Context, projectID string, serviceID string, environmentID string, zipBytes []byte) (*model.Service, error) {
385-
url := "https://gateway.zeabur.com/projects/" + projectID + "/services/" + serviceID + "/deploy"
386+
url := constant.ZeaburServerURL + "/projects/" + projectID + "/services/" + serviceID + "/deploy"
386387

387388
method := "POST"
388389

pkg/constant/const.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package constant
22

33
const (
4-
ZeaburServerURL = "https://gateway.zeabur.com"
5-
WebsocketURL = "wss://gateway.zeabur.com"
4+
ZeaburServerURL = "https://api.zeabur.com"
5+
WebsocketURL = "wss://api.zeabur.com"
66
)

0 commit comments

Comments
 (0)