add privacy-policy [skip-tests]
All checks were successful
Build Docker and Deploy / Run Unit-Tests (push) Has been skipped
Build Docker and Deploy / Build Docker Container (push) Successful in 1m9s
Build Docker and Deploy / Deploy to Server (push) Successful in 8s

This commit is contained in:
2025-11-10 15:13:13 +01:00
parent 6306555a30
commit dfb4d9d9e5
3 changed files with 77 additions and 5 deletions

View File

@@ -1,18 +1,19 @@
package handler
import (
"errors"
"net/http"
"regexp"
"strings"
"blackforestbytes.com/simplecloudnotifier/api/ginresp"
"blackforestbytes.com/simplecloudnotifier/logic"
"blackforestbytes.com/simplecloudnotifier/models"
"blackforestbytes.com/simplecloudnotifier/website"
"errors"
"git.blackforestbytes.com/BlackForestBytes/goext/ginext"
"git.blackforestbytes.com/BlackForestBytes/goext/rext"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog/log"
"net/http"
"regexp"
"strings"
)
type WebsiteHandler struct {
@@ -77,6 +78,18 @@ func (h WebsiteHandler) MessageSent(pctx ginext.PreContext) ginext.HTTPResponse
})
}
func (h WebsiteHandler) PrivacyPolicy(pctx ginext.PreContext) ginext.HTTPResponse {
ctx, g, errResp := pctx.Start()
if errResp != nil {
return *errResp
}
defer ctx.Cancel()
return h.app.DoRequest(ctx, g, models.TLockNone, func(ctx *logic.AppContext, finishSuccess func(r ginext.HTTPResponse) ginext.HTTPResponse) ginext.HTTPResponse {
return h.serveAsset(g, "privacy_policy.html", true)
})
}
func (h WebsiteHandler) FaviconIco(pctx ginext.PreContext) ginext.HTTPResponse {
ctx, g, errResp := pctx.Start()
if errResp != nil {