mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-05 15:26:36 +08:00
fix(zone): register domain delete/update APIs and drop edit UI
补全 Zone 与 Zone 域名的 update/delete 路由与业务逻辑,修复删除域名 404;前端域名列表移除编辑入口,仅保留添加与删除。
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user