whoami7 - Manager
:
/
home
/
dataiclx
/
vielorbe.com
/
wp-content
/
plugins
/
suremails
/
src
/
api
/
Upload File:
files >> //home/dataiclx/vielorbe.com/wp-content/plugins/suremails/src/api/auth.js
import apiFetch from '@wordpress/api-fetch'; import { __ } from '@wordpress/i18n'; export const get_gmail_auth_url = async ( provider, client_id, client_secret ) => { try { const response = await apiFetch( { path: '/suremails/v1/get-auth-url', method: 'POST', headers: { 'X-WP-Nonce': suremails.nonce, 'Content-Type': 'application/json', }, body: JSON.stringify( { provider, client_id, client_secret, } ), } ); return response; } catch ( error ) { throw new Error( error.message || __( 'There was an issue getting the auth URL.', 'suremails' ) ); } };
Copyright ©2021 || Defacer Indonesia