This commit is contained in:
2023-06-27 07:00:17 +08:00
parent c5ec178b4b
commit 9ec1490cf2
4 changed files with 46 additions and 19 deletions

View File

@@ -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"))
})
}