Add OPTIONS preflight.

This commit is contained in:
Paul Makles
2020-06-21 17:47:27 +01:00
parent 2095a2982b
commit 188fe30dbf
5 changed files with 61 additions and 8 deletions

View File

@@ -686,3 +686,9 @@ pub fn delete_message(user: UserRef, target: ChannelRef, message: Message) -> Op
)),
}
}
#[options("/create")] pub fn create_group_preflight() -> Response { Response::Result(super::Status::Ok) }
#[options("/<_target>")] pub fn channel_preflight(_target: String) -> Response { Response::Result(super::Status::Ok) }
#[options("/<_target>/recipients/<_member>")] pub fn member_preflight(_target: String, _member: String) -> Response { Response::Result(super::Status::Ok) }
#[options("/<_target>/messages")] pub fn messages_preflight(_target: String) -> Response { Response::Result(super::Status::Ok) }
#[options("/<_target>/messages/<_message>")] pub fn message_preflight(_target: String, _message: String) -> Response { Response::Result(super::Status::Ok) }