mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-30 15:24:15 +00:00
improved error handling
* ensure that number is provided in send receipt endpoint.
This commit is contained in:
parent
95e0b88671
commit
4b029b9e98
@ -1499,6 +1499,11 @@ func (a *Api) SendReceipt(c *gin.Context) {
|
|||||||
|
|
||||||
number := c.Param("number")
|
number := c.Param("number")
|
||||||
|
|
||||||
|
if number == "" {
|
||||||
|
c.JSON(400, Error{Msg: "Couldn't process request - number missing"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if req.Recipient == "" {
|
if req.Recipient == "" {
|
||||||
c.JSON(400, Error{Msg: "Couldn't process request - recipient missing"})
|
c.JSON(400, Error{Msg: "Couldn't process request - recipient missing"})
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user