unlike
This commit is contained in:
		@@ -311,3 +311,11 @@ func ImagesItemLike(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
		w.Write([]byte("ok"))
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 移除一条喜欢
 | 
			
		||||
func ImagesItemUnlike(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	models.AccountRead(w, r, func(account *models.Account) {
 | 
			
		||||
		models.LikeImage.Remove(strconv.Itoa(account.ID), mux.Vars(r)["id"])
 | 
			
		||||
		w.Write([]byte("ok"))
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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"))
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -173,3 +173,11 @@ func UsersItemLike(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
		w.Write([]byte("ok"))
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 移除一条喜欢
 | 
			
		||||
func UsersItemUnlike(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	models.AccountRead(w, r, func(account *models.Account) {
 | 
			
		||||
		models.LikeUser.Remove(strconv.Itoa(account.ID), mux.Vars(r)["id"])
 | 
			
		||||
		w.Write([]byte("ok"))
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user