From 8874df02d269a8f81eb76c647ae03c8454f72498 Mon Sep 17 00:00:00 2001 From: ston1th Date: Sun, 10 Jul 2022 01:27:46 +0200 Subject: [PATCH] added consent check --- pkg/server/handler.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/server/handler.go b/pkg/server/handler.go index 42a5a29..097d411 100644 --- a/pkg/server/handler.go +++ b/pkg/server/handler.go @@ -259,12 +259,11 @@ func consentHandler(ctx *Context) { if !ctx.CheckXsrf() { return } - // TODO html form - approved := true + consent := ctx.Form("consent") var err error rdr := root - if approved { + if consent == "approve" { rdr, err = ctx.ApproveConsent(data.ConsentChallenge) if err != nil { ctx.Error(err)