mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
[新增] OpenFlare Pages
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user