import http from './http' ; export const register = ( data = { } ) => { return http . post ( 'register' , data ) ; } ; export const login = ( data = { } ) => { return http . post ( 'login' , data ) ; } ; export const getUserList = ( data = { } ) => { return http . get ( 'user/list' , data ) ; } ; export const deleteUserById = ( data = { } ) => { return http . delete ( 'user/delete' , data ) ; } ; export const createArticle = ( data = { } ) => { return http . post ( 'article/create' , data ) ; } ; export const getArticleList = ( data = { } ) => { return http . get ( 'article/list' , data ) ; } ; export const getArticleById = ( data = { } ) => { return http . get ( 'article/detail' , data ) ; } ; export const deleteArticleById = ( data = { } ) => { return http . delete ( 'article/delete' , data ) ; } ; export const updateArticle = ( data = { } ) => { return http . put ( 'article/update' , data ) ; } ; export const getTagList = ( data = { } ) => { return http . get ( 'tag/list' , data ) ; } ; export const publishComment = ( data = { } ) => { return http . post ( 'discuss/publish' , data ) ; } ; export const deleteComment = ( data = { } ) => { return http . delete ( 'discuss/delete' , data ) ; } ; export const replyComment = ( data = { } ) => { return http . post ( 'discuss/reply' , data ) ; } ; export const deleteReply = ( data = { } ) => { return http . delete ( 'discuss/reply/delete' , data ) ; } ; export const getQiniuToken = ( data = { } ) => { return http . get ( 'qiniu/token' , data ) ; } ;