mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-09-30 03:51:43 +02:00
Default ?wait= to 0 seconds (#190)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user