MCPcopy Create free account
hub / github.com/asternic/wuzapi / getUserIdParam

Method getUserIdParam

stdio.go:186–193  ·  view source on GitHub ↗

routeRequest dispatches the request to the appropriate HTTP handler getUserIdParam extracts and validates userId from request params

(req *jsonRpcRequest)

Source from the content-addressed store, hash-verified

184// routeRequest dispatches the request to the appropriate HTTP handler
185// getUserIdParam extracts and validates userId from request params
186func (ss *stdioServer) getUserIdParam(req *jsonRpcRequest) (string, bool) {
187 userId, ok := req.Params["userId"].(string)
188 if !ok || userId == "" {
189 ss.sendError(req.ID, 400, "missing or invalid userId parameter")
190 return "", false
191 }
192 return userId, true
193}
194
195func (ss *stdioServer) routeRequest(req *jsonRpcRequest) {
196 // Map stdio method to HTTP route and method

Callers 1

routeRequestMethod · 0.95

Calls 1

sendErrorMethod · 0.95

Tested by

no test coverage detected