Skip to content

Commit

Permalink
fix key check case
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad2002 committed Dec 4, 2024
1 parent e6d62cd commit 00b4555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/notification_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (c *NotificationClient) SendNotification(key string, meeting string, title
}

func (c *NotificationClient) SendMeetingBroadcastNotification(key string, meeting string, body string) (*dto.BroadcastResponseDto, error) {
fmt.Printf("sending meeting broadcast request to: '%s'", "notification/broadcast/meeting/"+meeting)
fmt.Printf("sending meeting broadcast request to: '%s'\n", "notification/broadcast/meeting/"+meeting)

header := http.Header{}
header.Set("X-SWIMRESULTS-SERVICE", key)
Expand Down
2 changes: 1 addition & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func actuator(c *gin.Context) {

func checkServiceKey(c *gin.Context) error {
println("checking service key...")
received := c.Request.Header["X-SWIMRESULTS-SERVICE"]
received := c.Request.Header["X-Swimresults-Service"]
fmt.Printf("received: '%s', expected: '%s'\n", received, serviceKey)
if len(received) <= 0 {
return errors.New("no service authorization key in header")
Expand Down

0 comments on commit 00b4555

Please sign in to comment.