Closed josephdadams closed 2 years ago
this will not work correctly without an upgrade script to force existing actions to the new default content type. body will not parse as written without this because contenttype will not set just because a new field has a default assigned
Won’t it just be undefined?
yeah, but read your code … body will not parse for existing actions by that logic. i’m guessing people use that field.
Well, if they used it before, it parsed correctly before and should be valid.
all existing actions assumed application/json and body always tried a parse of body as json. you’re bypassing the parse of body for existing actions by not forcing this new field to its default for existing actions
Upgrade script and version bump it is then
Oh man. We forgot the upgrade script. My bad too. Should've caught that.
Includes other options for content type and includes them in the header. Will require modifications to companion core which will be in another pull request there.