docs(data-store): clarify for_type/for_id comment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -278,8 +278,8 @@ async function handle_submit_form(event: Event) {
|
||||
}
|
||||
|
||||
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_id is an integer FK in the DB — sending a string random ID causes a 400 error).
|
||||
// for_type/for_id are creation-time context; never re-send on update.
|
||||
// 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 };
|
||||
delete update_do.for_type;
|
||||
delete update_do.for_id;
|
||||
|
||||
Reference in New Issue
Block a user