[新增] OpenFlare Pages

This commit is contained in:
ryan
2026-06-03 17:09:02 +08:00
parent 3ec607106d
commit 2c74d042ed
38 changed files with 2630 additions and 72 deletions
+5 -1
View File
@@ -75,7 +75,11 @@ func decodeOptionalJSONBody(body io.Reader, target any) error {
}
func parseIDParam(c *gin.Context) (uint, bool) {
id, err := strconv.ParseUint(c.Param("id"), 10, 64)
return parseIDParamByName(c, "id")
}
func parseIDParamByName(c *gin.Context, name string) (uint, bool) {
id, err := strconv.ParseUint(c.Param(name), 10, 64)
if err != nil || id == 0 {
respondBadRequest(c, "")
return 0, false