#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=../lib/common.sh
source "${ROOT}/lib/common.sh"

EMAIL="${EMAIL:-user@example.com}"
CALLBACK="${CALLBACK_URL:-http://localhost:3000/verified}"

curl_post_json "/send-verification-email" \
  "$(printf '%s' "{\"email\":\"${EMAIL}\",\"callbackURL\":\"${CALLBACK}\"}")" | pretty
