Download wp-calypso/client/lib/domains/check-auth-code.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 428 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/check-auth-code.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/domains/check-auth-code.js
-
curl -L -o check-auth-code.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/check-auth-code.js
428 Bytes
| import wpcom from 'calypso/lib/wp'; | |
| export function checkAuthCode( domainName, authCode, onComplete ) { | |
| if ( ! domainName || ! authCode ) { | |
| onComplete( null, { success: false } ); | |
| return; | |
| } | |
| wpcom.req | |
| .get( `/domains/${ encodeURIComponent( domainName ) }/inbound-transfer-check-auth-code`, { | |
| auth_code: authCode, | |
| } ) | |
| .then( ( data ) => onComplete( null, data ) ) | |
| .catch( ( error ) => onComplete( error ) ); | |
| } | |