Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async fn handle_request(
- req: Request<Body>,
- table: Arc<Table<Invitation>>,
- ) -> Result<Response<Body>> {
- let path_segments: Vec<&str> = req.uri().path().trim_matches('/').split('/').collect();
- match (req.method(), path_segments.as_slice()) {
- (&Method::GET, ["invitations", id]) => api_get_response(table, id).await,
- _ => not_found(),
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement