Generalise BASE_URL
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
getPosts: function(id) {
|
getPosts: function(id) {
|
||||||
const BASE_URL = 'http://localhost:5000/api/posts'
|
const BASE_URL = '/api/posts'
|
||||||
const URL = BASE_URL + (id ? `/${id}` : '?sort=-1')
|
const URL = BASE_URL + (id ? `/${id}` : '?sort=-1')
|
||||||
|
|
||||||
this.$http
|
this.$http
|
||||||
|
|||||||
Reference in New Issue
Block a user