Fixing returned value of getSnapshotDownloadLinkEventHandler
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adam Štrauch 2021-11-04 00:20:30 +01:00
parent c5667f99b8
commit 3fdabb2229
Signed by: cx
GPG key ID: 018304FFA8988F8D

View file

@ -1013,7 +1013,16 @@ func getSnapshotDownloadLinkEventHandler(m *nats.Msg, message *RequestMessage) e
return errorReplyFormater(m, "backend error", err)
}
err = m.Respond([]byte(link))
reply := ReplyMessage{
Payload: link,
}
data, err := json.Marshal(reply)
if err != nil {
return errorReplyFormater(m, "reply formatter error", err)
}
err = m.Respond(data)
if err != nil {
log.Println("ERROR: get snapshot:", err.Error())
}