diff options
Diffstat (limited to 'app/controllers/sessions/dto.go')
| -rw-r--r-- | app/controllers/sessions/dto.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/sessions/dto.go b/app/controllers/sessions/dto.go index 4bb959f..a3ce6ba 100644 --- a/app/controllers/sessions/dto.go +++ b/app/controllers/sessions/dto.go @@ -1,5 +1,19 @@ package sessions +import ( + "net/http" + + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/views" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/pls" +) + type RedirectDTO struct { URL string } + +func (d *RedirectDTO) ServeHTTP(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Header().Add("Content-Type", "text/html") + + pls.LogError(r.Context(), views.Render(w, "sessions/redirect", d)) +} |
