Api#addUrl: Fix sent message

pull/18/head
Aloïs Micard 4 years ago
parent ed7ea4596b
commit 6519672b13
No known key found for this signature in database
GPG Key ID: 1A0EB82F071F5EFE

@ -211,7 +211,7 @@ func addURL(nc *nats.Conn) echo.HandlerFunc {
}
// Publish the URL
if err := natsutil.PublishJSON(nc, proto.URLFoundSubject, &proto.URLTodoMsg{URL: url}); err != nil {
if err := natsutil.PublishJSON(nc, proto.URLFoundSubject, &proto.URLFoundMsg{URL: url}); err != nil {
logrus.Errorf("Unable to publish URL: %s", err)
return c.NoContent(http.StatusInternalServerError)
}

Loading…
Cancel
Save