Skip to content

[Bug] Admin hide/unhide missing contract_address filter #238

@realproject7

Description

@realproject7

Problem

PR #234 added contract_address filtering to all frontend and API queries, but missed the admin hide/unhide operations in src/app/api/admin/auth.ts (lines ~74-75):

await supabase.from("storylines").update({ hidden }).eq("storyline_id", id)
await supabase.from("plots").update({ hidden }).eq("id", id);

Without the filter, hiding storyline #5 would hide it across ALL contracts, not just the current one.

Fix

Add .eq("contract_address", STORY_FACTORY.toLowerCase()) to both update queries.

Files

  • src/app/api/admin/auth.ts

Acceptance Criteria

  • Admin hide/unhide scoped to current contract only

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions