Compare commits

...
2 Commits
2 changed files with 2 additions and 6 deletions

No files matched your search

@@ -76,7 +76,7 @@ auto_derived!(
/// User's active status /// User's active status
pub struct UserStatus { pub struct UserStatus {
/// Custom status text /// Custom status text
#[serde(skip_serializing_if = "String::is_empty")] #[serde(skip_serializing_if = "String::is_empty", default)]
pub text: String, pub text: String,
/// Current presence option /// Current presence option
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@@ -86,7 +86,7 @@ auto_derived!(
/// User's profile /// User's profile
pub struct UserProfile { pub struct UserProfile {
/// Text content on user's profile /// Text content on user's profile
#[serde(skip_serializing_if = "String::is_empty")] #[serde(skip_serializing_if = "String::is_empty", default)]
pub content: String, pub content: String,
/// Background visible on user's profile /// Background visible on user's profile
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@@ -11,10 +11,6 @@ use rocket::serde::json::Json;
#[openapi(tag = "Groups")] #[openapi(tag = "Groups")]
#[get("/<target>/members")] #[get("/<target>/members")]
pub async fn req(db: &Db, user: User, target: Ref) -> Result<Json<Vec<User>>> { pub async fn req(db: &Db, user: User, target: Ref) -> Result<Json<Vec<User>>> {
if user.bot.is_some() {
return Err(Error::IsBot);
}
let channel = target.as_channel(db).await?; let channel = target.as_channel(db).await?;
perms(&user) perms(&user)
.channel(&channel) .channel(&channel)