Rename: FromId::from_id07 -> from_id

This commit is contained in:
Kitaiti Makoto
2022-05-02 19:24:36 +09:00
parent 0ab7774e29
commit 28440271bb
12 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -404,7 +404,7 @@ pub fn interact(conn: DbConn, user: Option<User>, target: String) -> Option<Redi
return Some(Redirect::to(uri!(super::user::details: name = target)));
}
if let Ok(post) = Post::from_id07(&conn, &target, None, CONFIG.proxy()) {
if let Ok(post) = Post::from_id(&conn, &target, None, CONFIG.proxy()) {
return Some(Redirect::to(uri!(
super::posts::details: blog = post.get_blog(&conn).expect("Can't retrieve blog").fqn,
slug = &post.slug,
@@ -412,7 +412,7 @@ pub fn interact(conn: DbConn, user: Option<User>, target: String) -> Option<Redi
)));
}
if let Ok(comment) = Comment::from_id07(&conn, &target, None, CONFIG.proxy()) {
if let Ok(comment) = Comment::from_id(&conn, &target, None, CONFIG.proxy()) {
if comment.can_see(&conn, user.as_ref()) {
let post = comment.get_post(&conn).expect("Can't retrieve post");
return Some(Redirect::to(uri!(