mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-23 16:27:35 +00:00
18f761d404
Revert "fix: REVERT register Passkey API v2"
20 lines
495 B
Go
20 lines
495 B
Go
package domain
|
|
|
|
import (
|
|
"io"
|
|
"text/template"
|
|
|
|
caos_errs "github.com/zitadel/zitadel/internal/errors"
|
|
)
|
|
|
|
func renderURLTemplate(w io.Writer, tmpl string, data any) error {
|
|
parsed, err := template.New("").Parse(tmpl)
|
|
if err != nil {
|
|
return caos_errs.ThrowInvalidArgument(err, "DOMAIN-oGh5e", "Errors.User.InvalidURLTemplate")
|
|
}
|
|
if err = parsed.Execute(w, data); err != nil {
|
|
return caos_errs.ThrowInvalidArgument(err, "DOMAIN-ieYa7", "Errors.User.InvalidURLTemplate")
|
|
}
|
|
return nil
|
|
}
|