ProcaWeb.ConfirmController (proca v3.0.2)

Controller processing two kinds of confirm links:

  1. supporter confirm (double opt in in most cases)
  2. generic Confirm

Link to this section Summary

Functions

Handles a generic accept/reject of a Confirm.

Handle a supporter confirm link of form: /link/s/123/REF_REF_REF/accept

Link to this section Functions

Link to this function

confirm(conn, params)

Handles a generic accept/reject of a Confirm.

Link of form: /link/1234567/accept

Optionally with query params:

  • email - if this Confirm was created for a recipient with email
  • id - if this Confirm was created for particular object id (schema determined by Confirm operation)
  • redir - query param to redirect after accepting/rejecting.
Link to this function

handle_supporter_redirect(action, map)

Link to this function

supporter(conn, params)

Handle a supporter confirm link of form: /link/s/123/REF_REF_REF/accept

This is a special case where we do not use Confirm model. Instead, we use the ref known to supporter. This way we do not have to create so many Confirm records when org is using double opt in.

This path optionally takes a ?redir query param to redirect after accepting/rejecting.