1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

Update to version 8.5.4 | Read HISTORY.md

https://github.com/kataras/iris/blob/master/HISTORY.md#th-26-october-2017--v854

Former-commit-id: 43a3b46b99085e0e0ed47b281e2f61dbb1ac6eb6
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-10-26 02:48:16 +03:00
parent 3c5f729f40
commit 4a63488948
18 changed files with 246 additions and 630 deletions

View File

@@ -58,6 +58,7 @@ func (r *userMemoryRepository) Exec(query Query, action Query, actionLimit int,
ok = query(user)
if ok {
if action(user) {
loops++
if actionLimit >= loops {
break // break
}

View File

@@ -60,6 +60,7 @@ func (r *movieMemoryRepository) Exec(query Query, action Query, actionLimit int,
ok = query(movie)
if ok {
if action(movie) {
loops++
if actionLimit >= loops {
break // break
}

View File

@@ -88,9 +88,9 @@ func profileByUsername(ctx iris.Context) {
// .Params are used to get dynamic path parameters.
username := ctx.Params().Get("username")
ctx.ViewData("Username", username)
// renders "./views/users/profile.html"
// renders "./views/user/profile.html"
// with {{ .Username }} equals to the username dynamic path parameter.
ctx.View("users/profile.html")
ctx.View("user/profile.html")
}
func getUserByID(ctx iris.Context) {
@@ -109,8 +109,8 @@ func createUser(ctx iris.Context) {
ctx.StatusCode(iris.StatusInternalServerError)
return
}
// renders "./views/users/create_verification.html"
// renders "./views/user/create_verification.html"
// with {{ . }} equals to the User object, i.e {{ .Username }} , {{ .Firstname}} etc...
ctx.ViewData("", user)
ctx.View("users/create_verification.html")
ctx.View("user/create_verification.html")
}