Questions about relationship analyses too
- The answer sees both charts and the comparison; both people see the questions - Heading, hint and example question per analysis kind Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
//! Questions about a finished detailed analysis: a natal chart analysis or a
|
||||
//! yearly forecast. Each question uses a `question` unit (admins ask for
|
||||
//! Questions about a finished detailed analysis: a natal chart analysis, a
|
||||
//! relationship (synastry) analysis or a yearly forecast. On a comparison both
|
||||
//! people see the questions and answers. Each question uses a `question` unit (admins ask for
|
||||
//! free). The worker answers with the question model of the admin page,
|
||||
//! seeing the chart data, the analysis and the earlier questions about it.
|
||||
|
||||
@@ -23,7 +24,7 @@ use crate::error::{ApiError, ApiResult};
|
||||
use crate::views::{rfc3339, rfc3339_opt};
|
||||
|
||||
/// The analyses that can be asked about.
|
||||
const ASKABLE: [&str; 2] = ["natal", "forecast"];
|
||||
const ASKABLE: [&str; 3] = ["natal", "synastry", "forecast"];
|
||||
/// A safety cap per analysis.
|
||||
const MAX_PER_ANALYSIS: i64 = 100;
|
||||
|
||||
@@ -115,7 +116,7 @@ pub async fn ask(
|
||||
return Err(ApiError::NotFound("analysis"));
|
||||
}
|
||||
if !ASKABLE.contains(&analysis.kind.as_str()) {
|
||||
return Err(ApiError::BadRequest("questions can be asked about a natal analysis or a forecast".into()));
|
||||
return Err(ApiError::BadRequest("questions can be asked about a detailed analysis or a forecast".into()));
|
||||
}
|
||||
if analysis.status != "done" {
|
||||
return Err(ApiError::conflict("analysis_not_ready", "Az elemzés még nem készült el."));
|
||||
|
||||
Reference in New Issue
Block a user