Free person slots (up to 30), Páros 3 500 Ft
- Persons are free up to FREE_PERSON_SLOTS (30); packages give no person slots, the "+5 személy" add-on is retired (still known for old orders and payments in flight). At the cap: write to us, an admin grants more. - Páros 3 500 Ft; "bought one by one" prices without persons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -62,12 +62,11 @@ pub async fn mock(
|
||||
(None, Some(Unit::Natal)) => "single",
|
||||
(None, Some(Unit::Synastry)) => "addon_synastry",
|
||||
(None, Some(Unit::Forecast)) => "addon_forecast",
|
||||
(None, Some(Unit::Person)) => "addon_persons",
|
||||
(None, Some(Unit::Question)) => "addon_questions",
|
||||
(None, Some(Unit::Tarot)) => "addon_tarot",
|
||||
_ => return Err(ApiError::BadRequest("give either package or unit".into())),
|
||||
};
|
||||
let package = packages::find(id).ok_or(ApiError::NotFound("package"))?;
|
||||
let package = packages::on_sale(id).ok_or(ApiError::NotFound("package"))?;
|
||||
let mut tx = state.db.begin().await?;
|
||||
packages::grant(&mut tx, auth.id(), package, Source::Mock, Some(auth.id()), Some("mock payment")).await?;
|
||||
tx.commit().await?;
|
||||
@@ -130,7 +129,7 @@ pub async fn checkout(
|
||||
WithRejection(Json(req), _): Body<CheckoutRequest>,
|
||||
) -> ApiResult<Json<Value>> {
|
||||
let config = stripe_for(&state, &auth)?;
|
||||
let package = packages::find(&req.package).ok_or(ApiError::NotFound("package"))?;
|
||||
let package = packages::on_sale(&req.package).ok_or(ApiError::NotFound("package"))?;
|
||||
let url = start_checkout(&state, config, &auth, package, req.return_path.as_deref(), None).await?;
|
||||
Ok(Json(json!({ "url": url })))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user