|
20 | 20 |
|
21 | 21 | //! This module implements Agama's HTTP API. |
22 | 22 |
|
23 | | -use crate::server::types::IssuesMap; |
24 | 23 | use agama_lib::error::ServiceError; |
25 | 24 | use agama_manager as manager; |
26 | 25 | use agama_manager::message; |
27 | 26 | use agama_utils::actor::Handler; |
28 | 27 | use agama_utils::api::config; |
29 | 28 | use agama_utils::api::event; |
30 | | -use agama_utils::api::{Action, Config, Status, SystemInfo}; |
| 29 | +use agama_utils::api::{Action, Config, IssueMap, Status, SystemInfo}; |
31 | 30 | use anyhow; |
32 | 31 | use axum::extract::State; |
33 | 32 | use axum::response::{IntoResponse, Response}; |
@@ -222,13 +221,13 @@ async fn get_proposal(State(state): State<ServerState>) -> ServerResult<Response |
222 | 221 | path = "/issues", |
223 | 222 | context_path = "/api/v2", |
224 | 223 | responses( |
225 | | - (status = 200, description = "Agama issues", body = IssuesMap), |
| 224 | + (status = 200, description = "Agama issues", body = IssueMap), |
226 | 225 | (status = 400, description = "Not possible to retrieve the issues") |
227 | 226 | ) |
228 | 227 | )] |
229 | | -async fn get_issues(State(state): State<ServerState>) -> ServerResult<Json<IssuesMap>> { |
| 228 | +async fn get_issues(State(state): State<ServerState>) -> ServerResult<Json<IssueMap>> { |
230 | 229 | let issues = state.manager.call(message::GetIssues).await?; |
231 | | - let issues_map: IssuesMap = issues.into(); |
| 230 | + let issues_map: IssueMap = issues.into(); |
232 | 231 | Ok(Json(issues_map)) |
233 | 232 | } |
234 | 233 |
|
|
0 commit comments