MCPcopy
hub / github.com/gotify/server / withID

Function withID

api/internalutil.go:11–17  ·  view source on GitHub ↗
(ctx *gin.Context, name string, f func(id uint))

Source from the content-addressed store, hash-verified

9)
10
11func withID(ctx *gin.Context, name string, f func(id uint)) {
12 if id, err := strconv.ParseUint(ctx.Param(name), 10, bits.UintSize); err == nil {
13 f(uint(id))
14 } else {
15 ctx.AbortWithError(400, errors.New("invalid id"))
16 }
17}

Callers 15

DeleteMessageMethod · 0.85
EnablePluginMethod · 0.85
DisablePluginMethod · 0.85
GetDisplayMethod · 0.85
GetConfigMethod · 0.85
UpdateConfigMethod · 0.85
DeleteApplicationMethod · 0.85
UpdateApplicationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…