feat: release v1.0.0
This commit is contained in:
22
src/api/blog/tag.ts
Normal file
22
src/api/blog/tag.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { http } from '@/lib'
|
||||
import type { PageParams, Tag, TagForm } from '@/schemas'
|
||||
|
||||
export const getTags = (params: PageParams) => {
|
||||
return http.get<Tag[], ApiPageResponse<Tag>>('/tag', { params })
|
||||
}
|
||||
|
||||
export const createTag = (data: TagForm) => {
|
||||
return http.post('/tag', data)
|
||||
}
|
||||
|
||||
export const updateTag = (id: number, data: TagForm) => {
|
||||
return http.patch(`/tag/${id}`, data)
|
||||
}
|
||||
|
||||
export const deleteTag = (id: number) => {
|
||||
return http.delete(`/tag/${id}`)
|
||||
}
|
||||
|
||||
export const listAllTags = () => {
|
||||
return http.get<Tag[]>('/tag/all')
|
||||
}
|
||||
Reference in New Issue
Block a user