Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bk-bscp): access blueking notification center #2915

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading