Rename: from_db07() -> from_db()

This commit is contained in:
Kitaiti Makoto
2022-05-03 01:23:37 +09:00
parent 06d2f68ecd
commit 7dd56a71e3
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ impl FromId<DbConn> for Blog {
type Error = Error;
type Object = CustomGroup;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Self::find_by_ap_url(conn, id)
}
+1 -1
View File
@@ -221,7 +221,7 @@ impl FromId<DbConn> for Comment {
type Error = Error;
type Object = Note;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Self::find_by_ap_url(conn, id)
}
+1 -1
View File
@@ -172,7 +172,7 @@ impl FromId<DbConn> for Follow {
type Error = Error;
type Object = FollowAct;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Follow::find_by_ap_url(conn, id)
}
+1 -1
View File
@@ -109,7 +109,7 @@ impl FromId<DbConn> for Like {
type Error = Error;
type Object = LikeAct;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Like::find_by_ap_url(conn, id)
}
+3 -3
View File
@@ -620,7 +620,7 @@ impl FromId<DbConn> for Post {
type Error = Error;
type Object = LicensedArticle;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Self::find_by_ap_url(conn, id)
}
@@ -674,7 +674,7 @@ impl FromId<DbConn> for Post {
.url()
.and_then(|url| url.to_as_uri().or(id))
.ok_or(Error::MissingApProperty)?;
let post = Post::from_db07(conn, &ap_url)
let post = Post::from_db(conn, &ap_url)
.and_then(|mut post| {
let mut updated = false;
@@ -849,7 +849,7 @@ impl FromId<DbConn> for PostUpdate {
type Error = Error;
type Object = LicensedArticle;
fn from_db07(_: &DbConn, _: &str) -> Result<Self> {
fn from_db(_: &DbConn, _: &str) -> Result<Self> {
// Always fail because we always want to deserialize the AP object
Err(Error::NotFound)
}
+1 -1
View File
@@ -138,7 +138,7 @@ impl FromId<DbConn> for Reshare {
type Error = Error;
type Object = Announce;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Reshare::find_by_ap_url(conn, id)
}
+1 -1
View File
@@ -948,7 +948,7 @@ impl FromId<DbConn> for User {
type Error = Error;
type Object = CustomPerson;
fn from_db07(conn: &DbConn, id: &str) -> Result<Self> {
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
Self::find_by_ap_url(conn, id)
}