瀏覽代碼

静态页面

1002884655 3 年之前
父節點
當前提交
21a22b5571
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/utils/hooks/useFavor.js

+ 1
- 1
src/utils/hooks/useFavor.js 查看文件

@@ -5,7 +5,7 @@ import { resolvePath } from '@/constants/api'
5 5
 import track from '@/utils/tracking/track'
6 6
 
7 7
 const addFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'POST' })
8
-const cancelFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'POST' })
8
+const cancelFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'DELETE' })
9 9
 
10 10
 export default function(saved, options = {}) {
11 11
   const { id, eventType } = options