Remove trailing 07 in routes/posts.rs

This commit is contained in:
Kitaiti Makoto 2022-05-03 02:14:16 +09:00
parent 9b04fb96e6
commit 78a001ac89

View File

@ -15,9 +15,7 @@ use crate::routes::{
}; };
use crate::template_utils::{IntoContext, Ructe}; use crate::template_utils::{IntoContext, Ructe};
use crate::utils::requires_login; use crate::utils::requires_login;
use plume_common::activity_pub::{ use plume_common::activity_pub::{broadcast, ActivityStream, ApRequest, LicensedArticle};
broadcast, ActivityStream, ApRequest, LicensedArticle as LicensedArticle07,
};
use plume_common::utils::md_to_html; use plume_common::utils::md_to_html;
use plume_models::{ use plume_models::{
blogs::*, blogs::*,
@ -108,7 +106,7 @@ pub fn activity_details(
slug: String, slug: String,
_ap: ApRequest, _ap: ApRequest,
conn: DbConn, conn: DbConn,
) -> Result<ActivityStream<LicensedArticle07>, Option<String>> { ) -> Result<ActivityStream<LicensedArticle>, Option<String>> {
let blog = Blog::find_by_fqn(&conn, &blog).map_err(|_| None)?; let blog = Blog::find_by_fqn(&conn, &blog).map_err(|_| None)?;
let post = Post::find_by_slug(&conn, &slug, blog.id).map_err(|_| None)?; let post = Post::find_by_slug(&conn, &slug, blog.id).map_err(|_| None)?;
if post.published { if post.published {