Servers: Ban and unban users +

ban list.
This commit is contained in:
Paul
2021-06-06 16:52:00 +01:00
parent 782bfb7e03
commit 4e90cf1f58
8 changed files with 197 additions and 8 deletions

View File

@@ -38,6 +38,7 @@ pub enum Error {
// ? Server related errors.
UnknownServer,
Banned,
// ? General errors.
TooManyIds,
@@ -87,6 +88,7 @@ impl<'r> Responder<'r, 'static> for Error {
Error::NotInGroup => Status::NotFound,
Error::UnknownServer => Status::NotFound,
Error::Banned => Status::Forbidden,
Error::FailedValidation { .. } => Status::UnprocessableEntity,
Error::DatabaseError { .. } => Status::InternalServerError,