Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Farr <[email protected]>
  • Loading branch information
avillega and dfarr authored Jan 22, 2025
1 parent 4a9c20e commit 13485da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/notify/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ func CreateNotifyCmd(c client.Client) *cobra.Command {
}

Check warning on line 70 in cmd/notify/create.go

View check run for this annotation

Codecov / codecov/patch

cmd/notify/create.go#L60-L70

Added lines #L60 - L70 were not covered by tests

if res.StatusCode() == 201 {
cmd.Printf("Created callback: %s\n", id)
cmd.Printf("Created notification: %s\n", id)
} else if res.StatusCode() == 200 {
if res.JSON200.Promise != nil && res.JSON200.Promise.State != v1.PromiseStatePENDING {
cmd.Printf("Promise %s already %s\n", promiseId, strings.ToLower(string(res.JSON200.Promise.State)))
} else {
cmd.Printf("Created callback: %s (deduplicated)\n", id)
cmd.Printf("Created notification: %s (deduplicated)\n", id)
}
} else {
cmd.PrintErrln(res.Status(), string(res.Body))
Expand Down

0 comments on commit 13485da

Please sign in to comment.