Skip to content

Commit

Permalink
feat(bk-bscp): access blueking notification center
Browse files Browse the repository at this point in the history
  • Loading branch information
AlkaidChan committed Jan 19, 2024
1 parent bcfcaad commit e55dbd9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bcs-services/bcs-bscp/cmd/api-server/service/bknotice.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (s *bkNoticeService) GetCurrentAnnouncements(w http.ResponseWriter, r *http
// Prepare the new request

proxyURL := fmt.Sprintf("%s/v1/announcement/get_current_announcements/?platform=%s",
config.G.Base.AppCode, cc.ApiServer().BKNotice.Host)
cc.ApiServer().BKNotice.Host, cc.ApiServer().Esb.AppCode)

proxyReq, err := http.NewRequest("GET", proxyURL, nil)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions bcs-services/bcs-bscp/pkg/cc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type ApiServerSetting struct {
Log LogOption `yaml:"log"`
Repo Repository `yaml:"repository"`
BKNotice BKNotice `yaml:"bkNotice"`
Esb Esb `yaml:"esb"`
FeatureFlags map[FeatureFlag]FeatureFlagOption `yaml:"featureFlags"`
}

Expand Down
3 changes: 1 addition & 2 deletions bcs-services/bcs-bscp/pkg/components/bknotice/bknotice.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/cc"
"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/components"
"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/config"
)

type registerSystemResp struct {
Expand All @@ -34,7 +33,7 @@ func RegisterSystem(ctx context.Context) error {
url := fmt.Sprintf("%s/v1/register/", cc.ApiServer().BKNotice.Host)

authHeader := fmt.Sprintf("{\"bk_app_code\": \"%s\", \"bk_app_secret\": \"%s\"}",
config.G.Base.AppCode, config.G.Base.AppSecret)
cc.ApiServer().Esb.AppCode, cc.ApiServer().Esb.AppSecret)

resp, err := components.GetClient().R().
SetContext(ctx).
Expand Down

0 comments on commit e55dbd9

Please sign in to comment.