Default ?wait= to 0 seconds (#190)
This commit is contained in:
parent
76f192bdb0
commit
4df43e6432
|
|
@ -20,7 +20,7 @@ func (controller *Controller) ip(ctx *gin.Context) responder.Responder {
|
|||
// Retrieve and parse path and query parameters
|
||||
name := ctx.Param("name")
|
||||
|
||||
waitRaw := ctx.Query("wait")
|
||||
waitRaw := ctx.DefaultQuery("wait", "0")
|
||||
wait, err := strconv.ParseUint(waitRaw, 10, 16)
|
||||
if err != nil {
|
||||
return responder.Code(http.StatusBadRequest)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ func (controller *Controller) portForwardVM(ctx *gin.Context) responder.Responde
|
|||
return responder.Code(http.StatusBadRequest)
|
||||
}
|
||||
|
||||
waitRaw := ctx.Query("wait")
|
||||
waitRaw := ctx.DefaultQuery("wait", "0")
|
||||
wait, err := strconv.ParseUint(waitRaw, 10, 16)
|
||||
if err != nil {
|
||||
return responder.Code(http.StatusBadRequest)
|
||||
|
|
|
|||
Loading…
Reference in New Issue