Request with newest first
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
getPosts: function() {
|
getPosts: function() {
|
||||||
this.$http
|
this.$http
|
||||||
.get('http://localhost:5000/api/posts?sort=1')
|
.get('http://localhost:5000/api/posts?sort=-1')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.posts = res.body
|
this.posts = res.body
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user