Moritz Schmidt 9 years ago
parent
commit
f44df155ed
1 changed files with 2 additions and 3 deletions
  1. 2 3
      templatehelpers.go

+ 2 - 3
templatehelpers.go

@@ -6,17 +6,16 @@ import (
   _ "fmt"
 )
 
-// TODO outsource this and down to main template handler?
-// -> no ShowError/ShowNotification needed anymore?
-
 func ShowError(ctx *iris.Context) {
   params := ctx.Get("params").(map[string]string)
   ctx.Render(params["reqDir"] + "_box.html", params)
+  ctx.StopExecution()
 }
 
 func ShowNotification(ctx *iris.Context) {
   params := ctx.Get("params").(map[string]string)
   ctx.Render(params["reqDir"] + "_box.html", params)
+  ctx.StopExecution()
 }
 
 func InitPageParams(ctx *iris.Context) {