fix: trim forum post titles
This commit is contained in:
parent
80a39e7489
commit
9650c0177e
10 changed files with 22 additions and 17 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue