You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a JS object (to use in a Liquid Actions API createEntry), the following doesn't work in wagon:
var order = {
name: foo,
user: bar.id // where the "user" field refers to "users" content_type; "orders" belongs_to "users"; "users" has_many "orders"
}
order = createEntry( 'orders', order );
Note: user: bar.id
The above will create an order with nil user:
{"name"=>"foo", "user_id"=>nil}
However, if I upload this to engine, the above will create an order with a user.
{"name"=>"foo", "user_id"=>"bar"}
To get it working in wagon, I have to re-write my JS object as follows:
var order = {
name: foo,
user_id: bar.id
}
Note: user_id: bar.id
However, conversely to the first code sample, if I upload the above to engine, it doesn't work.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
greyskin
changed the title
Inconsistency between Wagon and Engine
Inconsistency between Wagon and Engine (content_type_slug_singular vs content_type_slug_singluar_id)
Sep 23, 2022
When creating a JS object (to use in a Liquid Actions API
createEntry
), the following doesn't work in wagon:Note: user: bar.id
The above will create an order with nil user:
However, if I upload this to engine, the above will create an order with a user.
To get it working in wagon, I have to re-write my JS object as follows:
Note: user_id: bar.id
However, conversely to the first code sample, if I upload the above to engine, it doesn't work.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: