feat(FastAPI): add /packages (post)

The POST /packages route takes an `action`, `merge_into` and `confirm`
form data arguments. It then routes over to `action`'s callback provided
by `PACKAGE_ACTIONS`. This commit does not implement actions, but
mocks out the flow we would expect from the POST route.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-08 17:52:13 -07:00
parent 927f5e8567
commit c588a4e82e
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
3 changed files with 94 additions and 7 deletions

View file

@ -55,11 +55,10 @@
{% include "partials/widgets/pager.html" %}
{% endwith %}
{# Package action form #}
{# Package action form: persists query parameters. #}
<form id="pkglist-results-form"
action="/packages/?{{ q | urlencode }}"
method="post">
action="/packages?{{ q | urlencode }}" method="post"
>
{# Search results #}
{% with voted = packages_voted, notified = packages_notified %}
{% include "partials/packages/search_results.html" %}