Simplify rendering of content type pages and logic of selecting config

This commit is contained in:
sabaimran 2023-07-03 00:15:29 -07:00
parent 260272dca2
commit ea3dc2cfa3
3 changed files with 1 additions and 5 deletions

View file

@ -35,8 +35,6 @@
{% endfor %}
</div>
<button type="button" id="add-repository-button">Add Repository</button>
<h4 style="display: none;">You probably don't need to edit these.</h4>
<table style="display: none;" >
<tr>
<td>

View file

@ -44,8 +44,6 @@
</tr>
</table>
<h4 style="display: none;">You probably don't need to edit these.</h4>
<table style="display: none;" >
<tr>
<td>

View file

@ -38,7 +38,7 @@ if not state.demo:
search_type=None,
processor=None,
)
current_config = state.config if state.config else json.loads(default_full_config.json())
current_config = state.config or json.loads(default_full_config.json())
return templates.TemplateResponse("config.html", context={"request": request, "current_config": current_config})
@web_client.get("/config/content_type/github", response_class=HTMLResponse)