Looks promising
The proof of concept has been proven
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import axios from 'axios'
|
||||
|
||||
const http = axios.create({
|
||||
baseURL: 'http://localhost:8084/api'
|
||||
baseURL: 'http://localhost:3000/api/'
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -13,16 +13,16 @@ export default {
|
||||
* Set the bearer token for all future requests
|
||||
* @param {string} token The token to use to identify the user to the server
|
||||
*/
|
||||
setBearer: token => { http.defaults.headers.common['Authentication'] = `Bearer ${token}` },
|
||||
setBearer: token => { http.defaults.headers.common['authorization'] = `Bearer ${token}` },
|
||||
|
||||
/**
|
||||
* Remove the bearer token
|
||||
*/
|
||||
removeBearer: () => delete http.defaults.headers.common['Authentication'],
|
||||
removeBearer: () => delete http.defaults.headers.common['authorization'],
|
||||
|
||||
/**
|
||||
* Get all prayer requests and their most recent updates
|
||||
*/
|
||||
journal: () => http.get('/journal')
|
||||
journal: () => http.get('journal/')
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user