summaryrefslogtreecommitdiffstats
path: root/src/routes/posts.rs
diff options
context:
space:
mode:
authorColin Reeder <colin@vpzom.click>2020-08-08 10:01:49 -0600
committerColin Reeder <colin@vpzom.click>2020-08-08 10:01:49 -0600
commit643eb3ca33122b094c30d4503b20e8e4d7069345 (patch)
treeaedb1e2994fa734e0483b6549214718d960e8d3e /src/routes/posts.rs
parentc03de98fbb1f4769e3d9917ba87d6041d9c91dfe (diff)
parent7ca10ced7b48ecca3ecd645f7b6512e43d71dc81 (diff)
Merge branch 'api-changes' into master
Diffstat (limited to 'src/routes/posts.rs')
-rw-r--r--src/routes/posts.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/routes/posts.rs b/src/routes/posts.rs
index 7bb85bf..9223f13 100644
--- a/src/routes/posts.rs
+++ b/src/routes/posts.rs
@@ -267,11 +267,11 @@ async fn handler_post_like(
res_to_error(
ctx.http_client
.request(for_client(
- hyper::Request::post(format!(
- "{}/api/unstable/posts/{}/like",
+ hyper::Request::put(format!(
+ "{}/api/unstable/posts/{}/your_vote",
ctx.backend_host, post_id
))
- .body(Default::default())?,
+ .body("{}".into())?,
req.headers(),
&cookies,
)?)
@@ -302,7 +302,7 @@ async fn page_post_likes(
ctx.http_client
.request(for_client(
hyper::Request::get(format!(
- "{}/api/unstable/posts/{}/likes",
+ "{}/api/unstable/posts/{}/votes",
ctx.backend_host, post_id,
))
.body(Default::default())?,
@@ -366,8 +366,8 @@ async fn handler_post_unlike(
res_to_error(
ctx.http_client
.request(for_client(
- hyper::Request::post(format!(
- "{}/api/unstable/posts/{}/unlike",
+ hyper::Request::delete(format!(
+ "{}/api/unstable/posts/{}/your_vote",
ctx.backend_host, post_id
))
.body(Default::default())?,