Skip to content

Commit

Permalink
feat(data): Code adjustment for PR#3002 per review comments
Browse files Browse the repository at this point in the history
1. Update go doc for func PublishEvent
2. Update debug log when publishing event on the message queue
3. Update description for core-data V2 swagger API doc

Signed-off-by: Jude Hung <jude@iotechsys.com>
  • Loading branch information
judehung committed Jan 14, 2021
1 parent ef4d7ed commit bce2c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/core/data/v2/application/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func AddEvent(e models.Event, profileName string, deviceName string, ctx context
return nil
}

// PublishEvent publish incoming array of AddEventRequest through MessageClient
// PublishEvent publishes incoming AddEventRequest through MessageClient
func PublishEvent(addEventReq dto.AddEventRequest, profileName string, deviceName string, ctx context.Context, dic *di.Container) {
lc := container.LoggingClientFrom(dic.Get)
msgClient := dataContainer.MessagingClientFrom(dic.Get)
Expand Down Expand Up @@ -99,7 +99,7 @@ func PublishEvent(addEventReq dto.AddEventRequest, profileName string, deviceNam
"Device Name: %s, Error: %v", correlationId, profileName, deviceName, err))
} else {
lc.Debug(fmt.Sprintf(
"Event Published on message queue. Topic: %s, Correlation-id: %s ", publishTopic, correlationId))
"V2 API Event Published on message queue. Topic: %s, Correlation-id: %s ", publishTopic, correlationId))
}
}

Expand Down
2 changes: 1 addition & 1 deletion openapi/v2/core-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ paths:
value: '12.2'
responses:
'201':
description: "Indicates the event has been successfully created."
description: "Indicates the event has been successfully added."
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
Expand Down

0 comments on commit bce2c04

Please sign in to comment.