use crate::{ApiResponse, error::ApiError}; use actix_web::{HttpResponse, Result, web}; use service::AppService; use session::Session; #[utoipa::path( get, path = "/api/projects/{project_name}", params(("project_name" = String, Path)), responses( (status = 200, description = "Get project info", body = ApiResponse), (status = 401, description = "Unauthorized"), (status = 404, description = "Not found"), ), tag = "Project" )] pub async fn project_info( service: web::Data, session: Session, path: web::Path, ) -> Result { let project_name = path.into_inner(); let resp = service.project_info(&session, project_name).await?; Ok(ApiResponse::ok(resp).to_response()) }