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

@ -155,7 +155,7 @@ impl DataManager {
/// * `data` - a mock [`UserStack`] object to insert
pub async fn create_stack(&self, data: UserStack) -> Result<UserStack> {
// check values
if data.name.len() < 2 {
if data.name.trim().len() < 2 {
return Err(Error::DataTooShort("title".to_string()));
} else if data.name.len() > 32 {
return Err(Error::DataTooLong("title".to_string()));