providers/http: Make redirect function better

This commit is contained in:
Sasha Koshka 2024-12-10 21:32:50 -05:00
parent efc3fc0990
commit 79ac18c8c3

View File

@ -45,11 +45,11 @@ func funcError (status int, message any) (string, error) {
} }
} }
func funcRedirect (res shttp.WrappedResponseWriter, status int, pat string) (string, error) { func funcRedirect (status int, pat string) (string, error) {
// TODO remove parameters return "", shttp.Redirect {
res.Header.Add("Location", pat) Status: status,
res.WriteHeader(status) Location: pat,
return "", step.ErrExecutionCanceled }
} }
func funcParseForm (req *http.Request) url.Values { func funcParseForm (req *http.Request) url.Values {