Final preparation

This commit is contained in:
2024-08-15 19:15:58 +03:00
parent ab138e8536
commit a3e4ac2b2e
11 changed files with 208 additions and 58 deletions

View File

@ -15,6 +15,13 @@ pub async fn create(
.await
.can_write_guard()?;
if params.folder_name.len() > 255 {
return Err(GeneralError::message(
StatusCode::BAD_REQUEST,
"Folder name too long",
));
}
let exists = db::folder::name_exists(params.parent_folder_id, &params.folder_name, &pool)
.await
.handle_internal("Error getting existing names")?;