You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: members_fetch.rs
    path of file: ./repos/backend/crates/delta/src/routes/channels
    
    the code of the file until where you have to start completion: use revolt_quark::{
    models::{Channel, User},
    perms, Db, Error, Permission, Ref, Result,
};

use rocket::serde::json::Json;

/// # Fetch Group Members
///
/// Retrieves all users who are part of this group.
#[openapi(tag = "Groups")]
#[get("/<target>/members")]
pub async fn req(db: &Db, user: User, target: Ref)
    
pub async fn req(db: &Db, user: User, target: Ref) -> Result<Json<Vec<User>>> {
    let channel = target.as_channel(db).await?;
    perms(&user)
        .channel(&channel)
        .throw_permission(db, Permission::ViewChannel)
        .await?;

    if let Channel::Group { recipients, .. } = channel {
        Ok(Json(
            db.fetch_users(&recipients)
                .await?
                .into_iter()
                .map(|x| x.with_relationship(&user))
                .collect::<Vec<User>>(),
        ))
    } else {
        Err(Error::InvalidOperation)
    }
}