From 0e0209701d3c549a9c7a8247c5c9d463388f93dc Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Mon, 3 Feb 2025 12:55:01 +0800 Subject: [PATCH 1/2] fix(api): Use ZeaburServerURL constant --- pkg/api/service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/api/service.go b/pkg/api/service.go index 0abedda..5709233 100644 --- a/pkg/api/service.go +++ b/pkg/api/service.go @@ -11,6 +11,7 @@ import ( "time" "github.com/spf13/viper" + "github.com/zeabur/cli/pkg/constant" "github.com/zeabur/cli/pkg/model" ) @@ -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" From 6e78aad9176ea7961bfe58f06b2eed041882a39d Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Mon, 3 Feb 2025 12:55:35 +0800 Subject: [PATCH 2/2] feat(constant): Switch to new API endpoint --- pkg/constant/const.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/constant/const.go b/pkg/constant/const.go index d749981..306987d 100644 --- a/pkg/constant/const.go +++ b/pkg/constant/const.go @@ -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" )