Download wp-calypso/client/state/data-layer/wpcom/domains/status/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/data-layer/wpcom/domains/status/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/data-layer/wpcom/domains/status/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/data-layer/wpcom/domains/status/index.js
1.1 kB
| import { DOMAIN_WAPI_INFO_FETCH } from 'calypso/state/action-types'; | |
| import { registerHandlers } from 'calypso/state/data-layer/handler-registry'; | |
| import { http } from 'calypso/state/data-layer/wpcom-http/actions'; | |
| import { dispatchRequest } from 'calypso/state/data-layer/wpcom-http/utils'; | |
| import { | |
| fetchWapiDomainInfoFailure, | |
| fetchWapiDomainInfoSuccess, | |
| } from 'calypso/state/domains/transfer/actions'; | |
| export const fetchWapiDomainInfo = ( action ) => | |
| http( | |
| { | |
| apiVersion: '1.1', | |
| method: 'GET', | |
| path: '/domains/' + action.domain + '/status/', | |
| }, | |
| action | |
| ); | |
| export const handlefetchWapiDomainInfoSuccess = ( action, status ) => [ | |
| fetchWapiDomainInfoSuccess( action.domain, status ), | |
| ]; | |
| export const handlefetchWapiDomainInfoFailure = ( action, error ) => [ | |
| fetchWapiDomainInfoFailure( action.domain, error ), | |
| ]; | |
| registerHandlers( 'state/data-layer/wpcom/domains/status/index.js', { | |
| [ DOMAIN_WAPI_INFO_FETCH ]: [ | |
| dispatchRequest( { | |
| fetch: fetchWapiDomainInfo, | |
| onSuccess: handlefetchWapiDomainInfoSuccess, | |
| onError: handlefetchWapiDomainInfoFailure, | |
| } ), | |
| ], | |
| } ); | |