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
All of the API requests made from Gutenberg components to v2 API are currently noop-ed here. In order to make them work with actual API data we need to achieve a couple of things:
remove the noop middleware and correctly map all of the v2 endpoints to WP.com equivalents (e.g. /wp/v2/posts -> /wp/v2/sites/{siteSlug}/posts). I already added some code to handle the mapping, but we need to verify that there are no other edge cases that need to be mapped separately.
make authorized API request work. Once you remove the noop from above code you'll run into permission error (unauthorized request).
One thing that might be helpful with the above efforts is turning on the debug with localStorage.setItem( 'debug', 'calypso:gutenberg' );. This will display all of the currently attempted API calls in the console.
The text was updated successfully, but these errors were encountered:
All of the API requests made from Gutenberg components to v2 API are currently
noop
-ed here. In order to make them work with actual API data we need to achieve a couple of things:noop
middleware and correctly map all of the v2 endpoints to WP.com equivalents (e.g./wp/v2/posts
->/wp/v2/sites/{siteSlug}/posts
). I already added some code to handle the mapping, but we need to verify that there are no other edge cases that need to be mapped separately.noop
from above code you'll run into permission error (unauthorized request).One thing that might be helpful with the above efforts is turning on the debug with
localStorage.setItem( 'debug', 'calypso:gutenberg' );
. This will display all of the currently attempted API calls in the console.The text was updated successfully, but these errors were encountered: