add method to set default values for handler
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 11m53s
Gitea Actions Demo / build-and-test (push) Failing after 16m45s

This commit is contained in:
Thomas Peetz
2026-10-25 01:23:54 +02:00
parent 74cda6c72d
commit 05555a7750
5 changed files with 29 additions and 17 deletions
+15
View File
@@ -1,5 +1,9 @@
package globals
import (
"github.com/gin-gonic/gin"
)
var (
Secret = []byte("secret")
@@ -9,3 +13,14 @@ var (
)
const UserKey = "user"
func GetDefaultValues(user interface{}, message string) gin.H {
values := gin.H{
"title": "Kontor MediaFiles",
"version": Version,
"message": message,
"user": user,
}
return values
}