fix: restore match3d indexed visibility reads

This commit is contained in:
kdletters
2026-05-28 04:27:51 +08:00
parent a0134ce966
commit 82f24ded1b
5 changed files with 32 additions and 31 deletions

View File

@@ -349,9 +349,9 @@ fn wooden_fish_work_visibility_snapshot(
fn list_match3d_work_visibility(ctx: &ReducerContext) -> Vec<AdminWorkVisibilitySnapshot> {
ctx.db
.match3d_work_profile()
.iter()
.filter(|row| row.publication_status == MATCH3D_PUBLICATION_PUBLISHED)
.match_3_d_work_profile()
.by_match3d_work_publication_status()
.filter(MATCH3D_PUBLICATION_PUBLISHED)
.map(|row| match3d_work_visibility_snapshot(&row))
.collect()
}
@@ -363,7 +363,7 @@ fn update_match3d_work_visibility(
) -> Result<AdminWorkVisibilitySnapshot, String> {
let row = ctx
.db
.match3d_work_profile()
.match_3_d_work_profile()
.profile_id()
.find(&profile_id.to_string())
.ok_or_else(|| "抓大鹅作品不存在".to_string())?;
@@ -374,10 +374,10 @@ fn update_match3d_work_visibility(
let snapshot = match3d_work_visibility_snapshot(&next);
let profile_id = next.profile_id.clone();
ctx.db
.match3d_work_profile()
.match_3_d_work_profile()
.profile_id()
.delete(&profile_id);
ctx.db.match3d_work_profile().insert(next);
ctx.db.match_3_d_work_profile().insert(next);
Ok(snapshot)
}