MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / authorizePhoneAPIKey

Method authorizePhoneAPIKey

api/pkg/handlers/handler.go:147–153  ·  view source on GitHub ↗
(c fiber.Ctx, phoneNumber string)

Source from the content-addressed store, hash-verified

145}
146
147func (h *handler) authorizePhoneAPIKey(c fiber.Ctx, phoneNumber string) bool {
148 user := h.userFromContext(c)
149 if user.PhoneAPIKeyID == nil {
150 return true
151 }
152 return slices.Contains(user.PhoneNumbers, phoneNumber)
153}

Callers 4

PostEventMethod · 0.80
PostReceiveMethod · 0.80
PostCallMissedMethod · 0.80
StoreMethod · 0.80

Calls 1

userFromContextMethod · 0.95

Tested by

no test coverage detected