Files
romm/frontend
MMagTech 71f6cdf5d4 fix(states): send each state's content hash in the state list (#5668)
* fix(states): send each state's content hash in the state list

RomM stores a content hash for every state, and the save list already
sends each save's. StateSchema never had the field, so GET /api/states,
GET /api/states/{id} and a ROM's user_states left it out. A client that
keeps its own copies of states can now tell it already has one without
downloading it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(pr-ready): code-review fixes

Document what a state's content_hash covers in the schema and cover the
ROM detail user_states/all_user_states in the endpoint test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(pr-ready): simplify

Declare content_hash once on ManagedAsset, the schema side of the
ChannelContent model that owns the column, so saves and states share one
documented field. Build the hash test on the state fixture with a single
hash value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
2026-11-20 16:44:19 -05:00
..
2026-05-30 20:53:52 -04:00