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