MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / handleApproveMagicLinkGet

Method handleApproveMagicLinkGet

internal/agent/hitl_magic_api.go:30–32  ·  view source on GitHub ↗

The magic-link flow is split into GET (render a confirmation page) and POST (execute the action). This keeps email-client URL scanners — Gmail, Outlook Safe Links, Slack unfurls, corporate mail gateways — from accidentally approving or rejecting on behalf of the reviewer when they preview the link.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

28// --- GET confirmation pages ---
29
30func (a *API) handleApproveMagicLinkGet(w http.ResponseWriter, r *http.Request) {
31 a.renderConfirmPage(w, r, approvaltoken.ActionApprove)
32}
33
34func (a *API) handleRejectMagicLinkGet(w http.ResponseWriter, r *http.Request) {
35 a.renderConfirmPage(w, r, approvaltoken.ActionReject)

Callers

nothing calls this directly

Calls 1

renderConfirmPageMethod · 0.95

Tested by

no test coverage detected