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

Function WithUser

test/auth.go:9–12  ·  view source on GitHub ↗

WithUser fake an authentication for testing.

(ctx *gin.Context, userID uint)

Source from the content-addressed store, hash-verified

7
8// WithUser fake an authentication for testing.
9func WithUser(ctx *gin.Context, userID uint) {
10 ctx.Set("user", &model.User{ID: userID})
11 ctx.Set("userid", userID)
12}

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…