|
@@ -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
|