Skip to content

Commit

Permalink
go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
JunyuBD committed Dec 21, 2023
1 parent 15d7e4a commit 4cda645
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func SubmitHandler(w http.ResponseWriter, r *http.Request) {
return
}

//fmt.Printf("this is the response of submit handler %v \n", string(jsonResponse))
fmt.Printf("this is the response of submit handler %v \n", string(jsonResponse))

w.Write(jsonResponse)

Expand Down
8 changes: 4 additions & 4 deletions pre_oncall_api/pre_oncall_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
)

const (
//preOncallToken = "26ad213fcdc54e0da3a6e7fc79e99b75"
preOncallToken = "98d2d83a05094e6585f93b31f851d53c"
//preOncallPrefix = "https://lark-oncall.bytedance.net"
preOncallPrefix = "https://lark-oncall-boe.byted.org"
preOncallToken = "26ad213fcdc54e0da3a6e7fc79e99b75"
//preOncallToken = "98d2d83a05094e6585f93b31f851d53c"
preOncallPrefix = "https://lark-oncall.bytedance.net"
//preOncallPrefix = "https://lark-oncall-boe.byted.org"
)

func preOncallAPIError(ctx context.Context, err error) error {
Expand Down
2 changes: 1 addition & 1 deletion pre_oncall_service/canvas_constructor.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func InitRelatedTicketCanvas(ctx context.Context, oncallTickets pre_oncall.Ticke
// TODO: Replace with the real ticket info

for index, ticket := range oncallTickets.Data {
ticketBannerTitle := NewText(fmt.Sprintf("Related Ticket %v", index), "header")
ticketBannerTitle := NewText(fmt.Sprintf("Related Ticket %v", index+1), "header")
components = append(components, ticketBannerTitle)

ticketID := NewText(fmt.Sprintf("Ticket id: %v", ticket.TicketId), "paragraph")
Expand Down
2 changes: 0 additions & 2 deletions pre_oncall_service/pre_oncall_service_test.go

This file was deleted.

3 changes: 2 additions & 1 deletion pre_oncall_service/preoncall_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type IntercomComponent struct {
func HandlePreoncallCanvasSubmitAction(ctx context.Context, body string) (CanvasReponse, error) {
//log. := utils.Get//log.gerWithMethod(ctx, "HandlePreoncallCanvasSubmitAction")
//log..Infof("HandlePreoncallCanvasSubmitAction request body: %v", body)
//fmt.Printf("HandlePreoncallCanvasSubmitAction request body: %v \n", body)
var canvasReq IntercomCanvasRequest
if err := json.Unmarshal([]byte(body), &canvasReq); err != nil {
fmt.Println("meet parse err", err)
Expand Down Expand Up @@ -68,7 +69,7 @@ func HandlePreoncallCanvasSubmitAction(ctx context.Context, body string) (Canvas
}

//log..Infof("HandlePreoncallCanvasSubmitAction vanvas response %v", larkcore.Prettify(response))

//fmt.Printf("------- HandlePreoncallCanvasSubmitAction vanvas response %v \n", larkcore.Prettify(response))
return response, nil
}

Expand Down

0 comments on commit 4cda645

Please sign in to comment.