Skip to content

Commit 53e6159

Browse files
committed
update
1 parent e3b0c76 commit 53e6159

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/gmc/handler/bot.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ func CreateBot(c *gin.Context) {
5959
c.String(http.StatusBadRequest, "bad request, not protobuf")
6060
return
6161
}
62+
if req.BotId == 0 {
63+
c.String(http.StatusBadRequest, "botId is 0")
64+
return
65+
}
6266
_, ok := bot.Clients[req.BotId]
6367
if ok {
6468
c.String(http.StatusInternalServerError, "botId already exists")

0 commit comments

Comments
 (0)