mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 14:51:43 +00:00
fix interaction with web
This commit is contained in:
@ -58,6 +58,8 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>ahriman {{ version|e }}</h1>
|
||||
|
||||
<table class="sortable" id="builds">
|
||||
<tr>
|
||||
<th>package base</th>
|
||||
|
@ -79,10 +79,12 @@ class WebClient(Client):
|
||||
|
||||
payload: Dict[str, Any] = {
|
||||
'status': status.value,
|
||||
'package': {
|
||||
'base': package.base,
|
||||
'packages': [p for p in package.packages],
|
||||
'version': package.version,
|
||||
'url': package.web_url
|
||||
'aur_url': package.aur_url
|
||||
}
|
||||
}
|
||||
|
||||
try:
|
||||
|
@ -20,6 +20,8 @@
|
||||
from aiohttp_jinja2 import template
|
||||
from typing import Any, Dict
|
||||
|
||||
import ahriman.version as version
|
||||
|
||||
from ahriman.web.views.base import BaseView
|
||||
|
||||
|
||||
@ -43,4 +45,5 @@ class IndexView(BaseView):
|
||||
'architecture': self.service.architecture,
|
||||
'packages': packages,
|
||||
'repository': self.service.repository.name,
|
||||
'version': version.__version__,
|
||||
}
|
@ -37,7 +37,7 @@ class PackageView(BaseView):
|
||||
data = await self.request.json()
|
||||
|
||||
package = Package(**data['package']) if 'package' in data else None
|
||||
status = BuildStatusEnum(data.get('status', 'unknown'))
|
||||
status = BuildStatusEnum(data['status'])
|
||||
self.service.update(base, status, package)
|
||||
|
||||
return HTTPOk()
|
||||
|
Reference in New Issue
Block a user