openpodcast / api

OpenPodcast API server
https://openpodcast.dev
8 stars 2 forks source link

View declares feedback email as optional, but api-endpoint requires email #154

Closed LinuxDoku closed 10 months ago

LinuxDoku commented 10 months ago

When I submit a feedback without email address I receive the following error:

{"errors" :[{"value": "", "msg": "Invalid value", "param": "email", "location" : "body" }]}

But the view states to the user the email-field is optional: https://github.com/openpodcast/api/blob/ba2dfc9f915ed613f4ce8816def2ffb51865a716/views/feedback.hbs#L111C21-L111C90

<input type="email" name="email" placeholder="Your email (optional)">
mre commented 10 months ago

Thanks for the report. That's unfortunate. @woolfg, do we want to enforce the email and remove (optional)? I think, anonymous feedback might be valuable, so perhaps we should also avoid making it mandatory. Ideally, there should be a config setting, but I'd be pragmatic for now.

woolfg commented 10 months ago

I think for now we can just allow submissions without email.

mre commented 10 months ago

Here's an attempt to make emails optional: https://github.com/openpodcast/api/pull/155

mre commented 10 months ago

@LinuxDoku, this should work now.