import request from '@/utils/request' ; import { BlogTag } from '@root/src/models/blogTag' ; export const getBlogTags = ( params = { } ) => { return request . get < ResponseData < BlogTag [ ] > > ( '/blogTags' , params ) ; } ; export const getBlogTag = ( id ) => { return request . get < ResponseData < BlogTag > > ( `/blogTag/${ id }` ) ; } ; export const addBlogTag = ( params ) => { return request . post < ResponseData < BlogTag > > ( '/blogTag' , params ) ; } ; export const updateBlogTag = ( id , params ) => { return request . put < ResponseData < BlogTag > > ( `/blogTag/${ id }` , params ) ; } ; export const deleteBlogTag = ( id ) => { return request . delete < ResponseData < BlogTag > > ( `/blogTag/${ id }` ) ; } ; export const sortBlogTags = ( params ) => { return request . put < ResponseData < BlogTag > > ( `/blogTags/sort` , params ) ; } ;