重构(#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:
2026-07-16 19:45:23 -07:00
parent abd8c068b6
commit 58c346abec
4 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -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