tested shared Vuex store, created d8 userblock, enabled JSONAPI module
This commit is contained in:
14
web/themes/custom/materiotheme/vuejs/api/json-axios.js
Normal file
14
web/themes/custom/materiotheme/vuejs/api/json-axios.js
Normal file
@ -0,0 +1,14 @@
|
||||
import axios from 'axios'
|
||||
|
||||
// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
|
||||
|
||||
// console.log('drupalSettings', drupalSettings);
|
||||
|
||||
export const JSONAPI = axios.create({
|
||||
baseURL: `http://dev.materio.com/jsonapi`,
|
||||
headers: {
|
||||
Accept: 'application/vnd.api+json'
|
||||
// Authorization: 'Bearer {token}',
|
||||
// "Content-Type": "application/json"
|
||||
}
|
||||
})
|
13
web/themes/custom/materiotheme/vuejs/api/rest-axios.js
Normal file
13
web/themes/custom/materiotheme/vuejs/api/rest-axios.js
Normal file
@ -0,0 +1,13 @@
|
||||
import axios from 'axios'
|
||||
|
||||
// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
|
||||
|
||||
// console.log('drupalSettings', drupalSettings);
|
||||
|
||||
export const REST = axios.create({
|
||||
baseURL: `http://dev.materio.com`,
|
||||
headers: {
|
||||
Authorization: 'Bearer {token}',
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user