fix(zone): register domain delete/update APIs and drop edit UI

补全 Zone 与 Zone 域名的 update/delete 路由与业务逻辑,修复删除域名
404;前端域名列表移除编辑入口,仅保留添加与删除。
This commit is contained in:
ryan
2026-07-12 15:56:45 +08:00
parent 7ef84cce52
commit 8afd103751
11 changed files with 987 additions and 51 deletions
+6 -1
View File
@@ -25,7 +25,12 @@ func BindJSON(c *gin.Context, dst any) bool {
// IDParam parses :id from the URL path.
func IDParam(c *gin.Context) (uint, bool) {
raw := c.Param("id")
return NamedIDParam(c, "id")
}
// NamedIDParam parses a named path parameter as a positive uint ID.
func NamedIDParam(c *gin.Context, name string) (uint, bool) {
raw := c.Param(name)
if raw == "" {
response.AbortBadRequest(c, errInvalidID)
return 0, false