fix: don't allow communities to be renamed to in-use names
This commit is contained in:
parent
5995aaf31c
commit
e092d46586
7 changed files with 50 additions and 11 deletions
|
@ -31,6 +31,7 @@ pub enum Error {
|
|||
DataTooLong(String),
|
||||
DataTooShort(String),
|
||||
UsernameInUse,
|
||||
TitleInUse,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
|
@ -49,6 +50,7 @@ impl ToString for Error {
|
|||
Self::DataTooLong(name) => format!("Given {name} is too long!"),
|
||||
Self::DataTooShort(name) => format!("Given {name} is too short!"),
|
||||
Self::UsernameInUse => "Username in use".to_string(),
|
||||
Self::TitleInUse => "Title in use".to_string(),
|
||||
_ => format!("An unknown error as occurred: ({:?})", self),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue