Skip to content

fix(api): return the labels of each elevate word in the list - #4000

Open
marevol wants to merge 1 commit into
mainfrom
fix/elevateword-list-labels
Open

marevol wants to merge 1 commit into
mainfrom
fix/elevateword-list-labels

Conversation

@marevol

@marevol marevol commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

GET /api/admin/elevateword/settings built its items without reading the label mappings, so every item had an empty label_type_ids, and sending a list item back through PUT /api/admin/elevateword/setting removed the labels of that elevate word. The list now reads the label mappings of the whole page in one query, so an item carries the same label_type_ids as GET /api/admin/elevateword/setting/{id}. This also happens in 15.9.0.

Tests

  • New ElevateWordServiceTest: the labels are set on each item with one mapping query per page, and an empty page runs no query.
  • Checked against a running build: a list item carries its label, and a PUT of the item keeps it.

GET /api/admin/elevateword/settings built its items from
ElevateWordService#getElevateWordList, which did not read the label
mappings that #getElevateWord reads, so every item carried an empty
label_type_ids. A script that sent a list item back through
PUT /api/admin/elevateword/setting with one change removed the labels of
that elevate word.

getElevateWordList now sets the label type IDs of the page, reading the
label mappings of all its elevate words in one query, so a list item has
the same label_type_ids as GET /api/admin/elevateword/setting/{id}.
@marevol marevol added this to the 15.10.0 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant