feat(fastapi): add /pkgbase/{name}/merge (post)

Changes:

- `via` is not required in FastAPI. We deduce the involved
  requests via their PackageBaseName / MergeBaseName columns
  and set them to Accepted when merged.
- When erroneous input is given, the error is now presented
  on the merge page instead of sending the user to the pkgbase
  page.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-15 22:52:08 -07:00
parent bc9bb045ed
commit 5fb75b9614
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
3 changed files with 278 additions and 2 deletions

View file

@ -1,6 +1,15 @@
{% extends "partials/layout.html" %}
{% block pageContent %}
{% if errors %}
<ul class="errorlist">
{% for error in errors %}
<li>{{ error | tr }}</li>
{% endfor %}
</ul>
{% endif %}
<div class="box">
<h2>{{ "Merge Package" | tr }}: {{ pkgbase.Name }}</h2>