added support for sending messages via JSON-RPC

This commit is contained in:
Bernhard B
2021-09-12 18:11:45 +02:00
parent b20fb09653
commit f894364665
2 changed files with 147 additions and 95 deletions

View File

@@ -220,7 +220,7 @@ func (a *Api) Send(c *gin.Context) {
c.JSON(400, Error{Msg: err.Error()})
return
}
c.JSON(201, SendMessageResponse{Timestamp: timestamp})
c.JSON(201, SendMessageResponse{Timestamp: strconv.FormatInt(timestamp.Timestamp, 10)})
}
// @Summary Send a signal message.
@@ -257,7 +257,7 @@ func (a *Api) SendV2(c *gin.Context) {
return
}
c.JSON(201, SendMessageResponse{Timestamp: timestamps[0]})
c.JSON(201, SendMessageResponse{Timestamp: strconv.FormatInt((*timestamps)[0].Timestamp, 10)})
}
// @Summary Receive Signal Messages.