fix: trim forum post titles

This commit is contained in:
trisua 2025-08-04 23:29:24 -04:00
parent 80a39e7489
commit 9650c0177e
10 changed files with 22 additions and 17 deletions

View file

@ -561,7 +561,7 @@ pub async fn add_topic_request(
return Json(Error::DataTooLong("title".to_string()).into());
}
if req.title.len() < 2 {
if req.title.trim().len() < 2 {
return Json(Error::DataTooShort("title".to_string()).into());
}
@ -618,7 +618,7 @@ pub async fn update_topic_request(
return Json(Error::DataTooLong("title".to_string()).into());
}
if req.title.len() < 2 {
if req.title.trim().len() < 2 {
return Json(Error::DataTooShort("title".to_string()).into());
}