Moritz Schmidt преди 9 години
родител
ревизия
f44df155ed
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  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) {