summaryrefslogtreecommitdiffstats
path: root/server/src/api/post.rs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-06-10 22:47:06 -0400
committerDessalines <tyhou13@gmx.com>2020-06-10 22:47:06 -0400
commit4cf1f080bf113d6e30383eb1fddd37ce16025558 (patch)
tree13f6c91876336a8869a77e2ebb55242a7b08807a /server/src/api/post.rs
parent2fbd44c59db9c94f7cd2055550066f429a19154b (diff)
Adding delete picture via pict-rs delete tokens. Fixes #505
Diffstat (limited to 'server/src/api/post.rs')
-rw-r--r--server/src/api/post.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/api/post.rs b/server/src/api/post.rs
index 0e8a17e7..9eeb5158 100644
--- a/server/src/api/post.rs
+++ b/server/src/api/post.rs
@@ -116,8 +116,8 @@ impl Perform for Oper<CreatePost> {
return Err(APIError::err("site_ban").into());
}
- // Fetch Iframely and Pictshare cached image
- let (iframely_title, iframely_description, iframely_html, pictshare_thumbnail) =
+ // Fetch Iframely and pictrs cached image
+ let (iframely_title, iframely_description, iframely_html, pictrs_thumbnail) =
fetch_iframely_and_pictrs_data(data.url.to_owned());
let post_form = PostForm {
@@ -135,7 +135,7 @@ impl Perform for Oper<CreatePost> {
embed_title: iframely_title,
embed_description: iframely_description,
embed_html: iframely_html,
- thumbnail_url: pictshare_thumbnail,
+ thumbnail_url: pictrs_thumbnail,
};
let inserted_post = match Post::create(&conn, &post_form) {
@@ -450,8 +450,8 @@ impl Perform for Oper<EditPost> {
return Err(APIError::err("site_ban").into());
}
- // Fetch Iframely and Pictshare cached image
- let (iframely_title, iframely_description, iframely_html, pictshare_thumbnail) =
+ // Fetch Iframely and Pictrs cached image
+ let (iframely_title, iframely_description, iframely_html, pictrs_thumbnail) =
fetch_iframely_and_pictrs_data(data.url.to_owned());
let post_form = PostForm {
@@ -469,7 +469,7 @@ impl Perform for Oper<EditPost> {
embed_title: iframely_title,
embed_description: iframely_description,
embed_html: iframely_html,
- thumbnail_url: pictshare_thumbnail,
+ thumbnail_url: pictrs_thumbnail,
};
let _updated_post = match Post::update(&conn, data.edit_id, &post_form) {