Add messages, separate components, finish actions

This commit is contained in:
inpsyde-maticluznar 2024-12-19 13:10:19 +01:00
parent 40b1b0d280
commit ed77ad63ca
No known key found for this signature in database
GPG key ID: D005973F231309F6
13 changed files with 417 additions and 187 deletions

View file

@ -10,11 +10,12 @@
import apiFetch from '@wordpress/api-fetch';
import {
REST_PERSIST_PATH,
REST_MANUAL_CONNECTION_PATH,
REST_CONNECTION_URL_PATH,
REST_HYDRATE_MERCHANT_PATH,
REST_MANUAL_CONNECTION_PATH,
REST_PERSIST_PATH,
REST_REFRESH_FEATURES_PATH,
REST_WEBHOOKS,
} from './constants';
import ACTION_TYPES from './action-types';
@ -115,4 +116,11 @@ export const controls = {
};
}
},
async [ ACTION_TYPES.DO_RESUBSCRIBE_WEBHOOKS ]() {
return await apiFetch( {
method: 'POST',
path: REST_WEBHOOKS,
} );
},
};