add: allow supporters to upload gif avatars/banners

This commit is contained in:
trisua 2025-05-04 16:19:34 -04:00
parent cf38022597
commit e727de9c63
10 changed files with 231 additions and 52 deletions

View file

@ -43,6 +43,7 @@ pub enum Error {
UsernameInUse,
TitleInUse,
QuestionsDisabled,
RequiresSupporter,
Unknown,
}
@ -63,6 +64,9 @@ impl Display for Error {
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(),
Self::RequiresSupporter => {
"Only site supporters can upload GIF files as their avatar/banner".to_string()
}
_ => format!("An unknown error as occurred: ({:?})", self),
})
}