mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-27 16:01:07 -04:00
Pass in wordpress api details through iframe name instead.
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
storageType: 'local',
|
storageType: 'local'
|
||||||
wordpress_url: 'http://tih.test/wp-json/wp/v2/',
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { removeVuexORMFlags } from '@/utils/helpers';
|
import { removeVuexORMFlags } from '@/utils/helpers';
|
||||||
import config from '@/config/app.config';
|
|
||||||
|
const config = JSON.parse(window.name);
|
||||||
|
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
baseURL: config.wordpress_url,
|
baseURL: config.api_url,
|
||||||
|
headers: {
|
||||||
|
'X-WP-Nonce': config.nonce,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
class WordpressAdapter {
|
class WordpressAdapter {
|
||||||
|
|||||||
Reference in New Issue
Block a user