docs(data-store): clarify for_type/for_id comment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-17 11:25:42 -04:00
parent aeeb346d31
commit 7941c07a88

View File

@@ -278,8 +278,8 @@ async function handle_submit_form(event: Event) {
} }
const api_cfg = untrack(() => $ae_api); const api_cfg = untrack(() => $ae_api);
// for_type and for_id are parent-context fields set at creation time; never send them on update // for_type/for_id are creation-time context; never re-send on update.
// (for_id is an integer FK in the DB — sending a string random ID causes a 400 error). // DB stores for_id as integer; backend resolves and returns the random string — frontend must not send the string back.
const update_do: key_val = { ...data_store_do }; const update_do: key_val = { ...data_store_do };
delete update_do.for_type; delete update_do.for_type;
delete update_do.for_id; delete update_do.for_id;