处理路由冲突
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
// @Param id path int true "猪批次ID"
|
||||
// @Param body body dto.SellPigsRequest true "卖猪请求信息"
|
||||
// @Success 200 {object} controller.Response "卖猪成功"
|
||||
// @Router /api/v1/pig-batches/{id}/sell-pigs [post]
|
||||
// @Router /api/v1/pig-batches/sell-pigs/{id} [post]
|
||||
func (c *PigBatchController) SellPigs(ctx *gin.Context) {
|
||||
const action = "卖猪"
|
||||
var req dto.SellPigsRequest
|
||||
@@ -38,7 +38,7 @@ func (c *PigBatchController) SellPigs(ctx *gin.Context) {
|
||||
// @Param id path int true "猪批次ID"
|
||||
// @Param body body dto.BuyPigsRequest true "买猪请求信息"
|
||||
// @Success 200 {object} controller.Response "买猪成功"
|
||||
// @Router /api/v1/pig-batches/{id}/buy-pigs [post]
|
||||
// @Router /api/v1/pig-batches/buy-pigs/{id} [post]
|
||||
func (c *PigBatchController) BuyPigs(ctx *gin.Context) {
|
||||
const action = "买猪"
|
||||
var req dto.BuyPigsRequest
|
||||
|
||||
Reference in New Issue
Block a user