Feat(Store): Add tool favorite control

Add tool favorite control
This commit is contained in:
2024-04-26 18:09:07 +08:00
parent 64c510cd42
commit 5c77e1ae90
7 changed files with 68 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import {
URL_TOOL,
URL_TOOL_CATEGORY,
URL_TOOL_DETAIL,
URL_TOOL_FAVORITE,
URL_TOOL_STORE,
URL_TOOL_TEMPLATE
} from '@/constants/urls.constants'
@@ -37,3 +38,9 @@ export const r_tool_store_get = (param: ToolStoreGetParam) =>
export const r_tool_store_get_by_username = (username: string, param: ToolStoreGetParam) =>
request.get<PageVo<ToolVo>>(`${URL_TOOL_STORE}/${username}`, param)
export const r_tool_add_favorite = (param: ToolFavoriteAddRemoveParam) =>
request.post(`${URL_TOOL_FAVORITE}`, param)
export const r_tool_remove_favorite = (param: ToolFavoriteAddRemoveParam) =>
request.delete(`${URL_TOOL_FAVORITE}`, param)