forked from jmug/stoatchat
feat: implement channel invites, perms, group create, members fetch
chore: when you accidentally run fmt
This commit is contained in:
@@ -5,22 +5,25 @@ use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ServerId {
|
||||
server: String
|
||||
server: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct GroupId {
|
||||
group: String
|
||||
group: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum Destination {
|
||||
Server(ServerId),
|
||||
Group(GroupId)
|
||||
Group(GroupId),
|
||||
}
|
||||
|
||||
#[post("/<target>/invite", data = "<dest>")]
|
||||
pub async fn invite_bot(/*user: UserRef, target: Ref,*/ target: String, dest: Json<Destination>) -> Result<EmptyResponse> {
|
||||
pub async fn invite_bot(
|
||||
/*user: UserRef, target: Ref,*/ target: String,
|
||||
dest: Json<Destination>,
|
||||
) -> Result<EmptyResponse> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user