fix: don't allow empty drawings to be uploaded

This commit is contained in:
trisua 2025-06-20 19:27:12 -04:00
parent 16843a6ab8
commit a4298f95f6
2 changed files with 5 additions and 0 deletions

View file

@ -43,6 +43,7 @@ pub enum Error {
DataTooLong(String),
DataTooShort(String),
FileTooLarge,
FileTooSmall,
UsernameInUse,
TitleInUse,
QuestionsDisabled,
@ -66,6 +67,7 @@ impl Display for Error {
Self::DataTooLong(name) => format!("Given {name} is too long!"),
Self::DataTooShort(name) => format!("Given {name} is too short!"),
Self::FileTooLarge => "Given file is too large".to_string(),
Self::FileTooSmall => "Given file is too small".to_string(),
Self::UsernameInUse => "Username in use".to_string(),
Self::TitleInUse => "Title in use".to_string(),
Self::QuestionsDisabled => "You are not allowed to ask questions there".to_string(),