add: "ask about this" from neospring

This commit is contained in:
trisua 2025-07-13 18:42:08 -04:00
parent f94570f74c
commit 2c83ed3d9d
9 changed files with 122 additions and 31 deletions

View file

@ -96,6 +96,13 @@ pub async fn create_request(
props.context.mask_owner = true;
}
if !req.asking_about.is_empty() && !req.is_global {
props.context.asking_about = match req.asking_about.parse::<usize>() {
Ok(x) => Some(x),
Err(e) => return Json(Error::MiscError(e.to_string()).into()),
}
}
match data
.create_question(props, drawings.iter().map(|x| x.to_vec()).collect())
.await

View file

@ -865,6 +865,8 @@ pub struct CreateQuestion {
pub community: String,
#[serde(default)]
pub mask_owner: bool,
#[serde(default)]
pub asking_about: String,
}
#[derive(Deserialize)]