File size: 428 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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 ) );
}
|