fix: use transaction

This commit is contained in:
əlemi 2024-06-06 06:51:32 +02:00
parent e3328954e2
commit 45bbc34dba
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -38,7 +38,7 @@ pub async fn process(ctx: Context, job: &model::job::Model) -> crate::JobResult<
.select_only() .select_only()
.select_column(model::actor::Column::Id) .select_column(model::actor::Column::Id)
.into_tuple::<String>() .into_tuple::<String>()
.one(ctx.db()) .one(&tx)
.await .await
{ {
tmp = tmp.replacen(full, &format!("<a href=\"{uid}\" class=\"u-url mention\">@{user}</a>"), 1); tmp = tmp.replacen(full, &format!("<a href=\"{uid}\" class=\"u-url mention\">@{user}</a>"), 1);