Backend for the feedback form of https://designers.italia.it
Sends an email to MAIL_ADDRESSES (env variable with comma separated list of email addresses) containing
the formatted payload.
The raw payload is also base64 encoded in the X-Serialized email header.
{
"feedback": "+",
"url": "https://designers.italia.it/home",
"who": "progettista",
"from": "motore-di-ricerca",
"details": "potentially long text\nwith details\n",
"captcha": "captcha-challenge-string"
}Where:
feedback: is the feedback for the page and can be either+or-url: is the page the feedback is aboutwho: is the type of userfrom: is where the user found this pagedetails: are the additional details the user wrote to the formcaptcha: is the CAPTCHA challenge string from reCAPTCHA, if CAPTCHA is enable with theCAPTCHA_ENABLEDenvironment variable at build time
HTTP code 200
{ "message": "ok" }HTTP code 400
{ "message": "Captcha verification failed" }HTTP code < 200 or HTTP code > 400
{ "message": "Error details" }