MCPcopy Index your code
hub / github.com/dnote/dnote / RedirectAlert

Function RedirectAlert

pkg/server/views/data.go:157–160  ·  view source on GitHub ↗

RedirectAlert redirects to a URL after persisting the provided alert data into a cookie so that it can be displayed when the page is rendered.

(w http.ResponseWriter, r *http.Request, urlStr string, code int, alert Alert)

Source from the content-addressed store, hash-verified

155// RedirectAlert redirects to a URL after persisting the provided alert data
156// into a cookie so that it can be displayed when the page is rendered.
157func RedirectAlert(w http.ResponseWriter, r *http.Request, urlStr string, code int, alert Alert) {
158 persistAlert(w, alert)
159 http.Redirect(w, r, urlStr, code)
160}
161
162// PublicError is an error meant to be displayed to the public
163type PublicError interface {

Callers 4

CreateResetTokenMethod · 0.92
PasswordResetMethod · 0.92
PasswordUpdateMethod · 0.92
ProfileUpdateMethod · 0.92

Calls 1

persistAlertFunction · 0.85

Tested by

no test coverage detected