diff options
author | Colin Reeder <vpzomtrrfrt@gmail.com> | 2020-10-23 22:24:38 -0600 |
---|---|---|
committer | Colin Reeder <vpzomtrrfrt@gmail.com> | 2020-10-23 22:24:38 -0600 |
commit | d98b7e2445485398d6c1b96b2439db7c71686452 (patch) | |
tree | f1d623cb2884322f442fb0273d85412b8b9123d9 | |
parent | bda4da06734247e128f08f17a7100773889ca325 (diff) |
Remove old APIs
-rw-r--r-- | src/routes/api/comments.rs | 13 | ||||
-rw-r--r-- | src/routes/api/posts.rs | 13 | ||||
-rw-r--r-- | src/routes/api/users.rs | 4 |
3 files changed, 1 insertions, 29 deletions
diff --git a/src/routes/api/comments.rs b/src/routes/api/comments.rs index 274b315..545771c 100644 --- a/src/routes/api/comments.rs +++ b/src/routes/api/comments.rs @@ -675,19 +675,6 @@ pub fn route_comments() -> crate::RouteNode<()> { .with_handler_async("GET", route_unstable_comments_attachments_0_href_get), ) .with_child( - "like", - crate::RouteNode::new().with_handler_async("POST", route_unstable_comments_like), - ) - .with_child( - "likes", - crate::RouteNode::new() - .with_handler_async("GET", route_unstable_comments_likes_list), - ) - .with_child( - "unlike", - crate::RouteNode::new().with_handler_async("POST", route_unstable_comments_unlike), - ) - .with_child( "replies", crate::RouteNode::new() .with_handler_async("POST", route_unstable_comments_replies_create), diff --git a/src/routes/api/posts.rs b/src/routes/api/posts.rs index b1548be..0be75ac 100644 --- a/src/routes/api/posts.rs +++ b/src/routes/api/posts.rs @@ -903,19 +903,6 @@ pub fn route_posts() -> crate::RouteNode<()> { .with_handler_async("GET", route_unstable_posts_href_get), ) .with_child( - "like", - crate::RouteNode::new().with_handler_async("POST", route_unstable_posts_like), - ) - .with_child( - "likes", - crate::RouteNode::new() - .with_handler_async("GET", route_unstable_posts_likes_list), - ) - .with_child( - "unlike", - crate::RouteNode::new().with_handler_async("POST", route_unstable_posts_unlike), - ) - .with_child( "replies", crate::RouteNode::new() .with_handler_async("POST", route_unstable_posts_replies_create), diff --git a/src/routes/api/users.rs b/src/routes/api/users.rs index 825f1c2..e9421a7 100644 --- a/src/routes/api/users.rs +++ b/src/routes/api/users.rs @@ -59,9 +59,7 @@ impl std::str::FromStr for UserIDOrMe { type Err = std::num::ParseIntError; fn from_str(src: &str) -> Result<Self, Self::Err> { - if src == "~me" || src == "me" - /* temporary backward compat */ - { + if src == "~me" { Ok(UserIDOrMe::Me) } else { src.parse().map(UserIDOrMe::User) |