Looks promising

The proof of concept has been proven
This commit is contained in:
Daniel J. Summers
2017-09-15 22:38:45 -05:00
parent a10e4ded48
commit fc02112295
19 changed files with 974 additions and 547 deletions
+4 -4
View File
@@ -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/')
}