Add join / leave messages for groups.

This commit is contained in:
Paul Makles
2020-04-12 16:42:13 +01:00
parent 87e7df02f2
commit 4fbd6c816d
5 changed files with 149 additions and 85 deletions

View File

@@ -19,6 +19,8 @@ pub enum Response {
Success(JsonValue),
#[response()]
Redirect(Redirect),
#[response(status = 207)]
PartialStatus(JsonValue),
#[response(status = 400)]
BadRequest(JsonValue),
#[response(status = 401)]
@@ -51,8 +53,7 @@ impl<'a> rocket::response::Responder<'a> for Permission {
.header(ContentType::JSON)
.sized_body(Cursor::new(format!(
"{{\"error\":\"Lacking permission: {:?}.\",\"permission\":{}}}",
self,
self as u32,
self, self as u32,
)))
.ok()
}