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) {