mirror of
https://github.com/kataras/iris.git
synced 2025-03-13 21:36:28 +01:00
Nothing special here,yet, stay tuned
This commit is contained in:
parent
88c98bb1e1
commit
1f25e4335a
|
@ -112,7 +112,7 @@ func main(){
|
|||
|
||||
// take the :id from the path, parse to integer
|
||||
// and set it to the new userID local variable.
|
||||
userID := ctx.ParamInt("id")
|
||||
userID,_ := ctx.ParamInt("id")
|
||||
|
||||
// userRepo, imaginary database service <- your only job.
|
||||
user := userRepo.GetByID(userID)
|
||||
|
|
|
@ -715,7 +715,7 @@ func TestCache(t *testing.T) {
|
|||
|
||||
func TestRedirectHTTPS(t *testing.T) {
|
||||
iris.ResetDefault()
|
||||
host := "localhost:5700"
|
||||
host := "localhost:" + strconv.Itoa(getRandomNumber(4545, 5555))
|
||||
expectedBody := "Redirected to https://" + host + "/redirected"
|
||||
|
||||
iris.Get("/redirect", func(ctx *iris.Context) { ctx.Redirect("/redirected") })
|
||||
|
|
Loading…
Reference in New Issue
Block a user