Repository navigation
add form-based callbacks - #10
Conversation
🤖 Augment PR SummarySummary: Adds native HTML form submission support to Hypergen callbacks. Changes:
request.form and request.files while callback arguments continue through hypergen_data.
🤖 Was this summary useful? React with 👍 or 👎 |
| hypergen.hypergenGlobalFormdata = new FormData() | ||
| hypergen.hypergenGlobalFormdata = formId === null | ||
| ? new FormData() | ||
| : new FormData(document.getElementById(formId)) |
There was a problem hiding this comment.
src/flask_hypergen/static-src/hypergen.js:190: A native form may legally contain a control named hypergen_data; this FormData retains that value and the framework payload is later appended, so request.form['hypergen_data'] resolves to the user control's first value rather than the callback JSON. Such forms will then fail to decode their callback arguments (or invoke the action with the wrong arguments).
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
- Coverage 98.07% 97.43% -0.64%
==========================================
Files 13 13
Lines 2283 2342 +59
Branches 152 153 +1
==========================================
+ Hits 2239 2282 +43
- Misses 40 56 +16
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.