feat: Message pinning

This commit is contained in:
Zomatree
2024-07-18 18:37:41 +01:00
parent 412f4a99d7
commit 389ecc0e5c
13 changed files with 136 additions and 2 deletions

View File

@@ -90,6 +90,8 @@ pub enum ErrorType {
},
AlreadyInGroup,
NotInGroup,
AlreadyPinned,
NotPinned,
// ? Server related errors
UnknownServer,

View File

@@ -40,6 +40,8 @@ impl<'r> Responder<'r, 'static> for Error {
ErrorType::GroupTooLarge { .. } => Status::Forbidden,
ErrorType::AlreadyInGroup => Status::Conflict,
ErrorType::NotInGroup => Status::NotFound,
ErrorType::AlreadyPinned => Status::BadRequest,
ErrorType::NotPinned => Status::BadRequest,
ErrorType::UnknownServer => Status::NotFound,
ErrorType::InvalidRole => Status::NotFound,