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

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