enable-mastodon-apps
enable-mastodon-apps copied to clipboard
PATCH routes: support array types
The fields_attributes
in api/v1/update_credentials
are submitted in a multipart/form-data
hash like:
# Simplifying to not show the boundary
fields_attributes[0][name]
Some Title
fields_attributes[0][value]
Some Value
fields_attributes[1][name]
Another Title
# etc
We were only handling the simple value type before. While we shouldn't need the other array types, I figured I'd be completionist.
This is required for Extra Fields editing in ActivityPub: https://github.com/Automattic/wordpress-activitypub/pull/788