Skip to content

Commit

Permalink
Switch to new api.zeabur.com (#117)
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
pan93412 authored Feb 3, 2025
2 parents ba799ed + 6e78aad commit e92ead3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/spf13/viper"
"github.com/zeabur/cli/pkg/constant"
"github.com/zeabur/cli/pkg/model"
)

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

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

method := "POST"

Expand Down
4 changes: 2 additions & 2 deletions pkg/constant/const.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package constant

const (
ZeaburServerURL = "https://gateway.zeabur.com"
WebsocketURL = "wss://gateway.zeabur.com"
ZeaburServerURL = "https://api.zeabur.com"
WebsocketURL = "wss://api.zeabur.com"
)

0 comments on commit e92ead3

Please sign in to comment.