重构(#4): 抽奖奖品改/删 id 走 URL path(RESTful)
- PUT /admin/lottery/prizes/:id、DELETE /admin/lottery/prizes/:id
- handler 从 c.Param("id") 取 id;types 用 path:"id"
- 同步 apis/admin/lottery.api 定义
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,11 +49,11 @@ service ppanel {
|
||||
|
||||
@doc "Update prize"
|
||||
@handler UpdateLotteryPrize
|
||||
put /prizes (UpdateAdminLotteryPrizeRequest) returns (AdminLotteryPrize)
|
||||
put /prizes/:id (UpdateAdminLotteryPrizeRequest) returns (AdminLotteryPrize)
|
||||
|
||||
@doc "Delete prize"
|
||||
@handler DeleteLotteryPrize
|
||||
delete /prizes (AdminPrizeIdRequest)
|
||||
delete /prizes/:id (AdminPrizeIdRequest)
|
||||
|
||||
@doc "List prizes on an activity"
|
||||
@handler ListLotteryPrizes
|
||||
|
||||
Reference in New Issue
Block a user