unlike
This commit is contained in:
@@ -307,3 +307,11 @@ func ModelsItemLike(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("ok"))
|
||||
})
|
||||
}
|
||||
|
||||
// 移除一条喜欢
|
||||
func ModelsItemUnlike(w http.ResponseWriter, r *http.Request) {
|
||||
models.AccountRead(w, r, func(account *models.Account) {
|
||||
models.LikeModel.Remove(strconv.Itoa(account.ID), mux.Vars(r)["id"])
|
||||
w.Write([]byte("ok"))
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user