import instance from './instance';

var blogResource = {
	addBlog: function(data){
		return instance.post('/blogs', data);
	},
	getBlogs: function(){
		return instance.get('/blogs');
	},
	getBlogById: function(id){
		return instance.get('/blogs/' + id);
	},
	deleteBlog: function(id){
		return instance.delete('/blogs/' + id);
	},
	updateBlog: function(id, data){
		return instance.put('/blogs/' + id, data);
	}
}

export default blogResource;
@@ -172,16 +172,32 @@
 ('/blogs
+?sort=-create_at
 ');%0A%09%7D,%0A

update blog api sort