(ctx *gin.Context)
| 76 | } |
| 77 | |
| 78 | func (i *imlMcpController) AppHandleMessage(ctx *gin.Context) { |
| 79 | appId := ctx.Param("app") |
| 80 | if appId == "" { |
| 81 | ctx.AbortWithStatusJSON(403, gin.H{"code": -1, "msg": "invalid app id", "success": "fail"}) |
| 82 | return |
| 83 | } |
| 84 | ctx.Request.URL.Path = fmt.Sprintf("/openapi/v1/%s/message", mcp_server.GlobalBasePath) |
| 85 | //ctx.Request = ctx.Request.WithContext(utils.SetLabel(ctx.Request.Context(), "app", appId)) |
| 86 | i.handleMessage(ctx, i.openSseServer) |
| 87 | } |
| 88 | |
| 89 | func (i *imlMcpController) AppHandleStreamHTTP(ctx *gin.Context) { |
| 90 | apikey := ctx.Request.Header.Get("Authorization") |
nothing calls this directly
no test coverage detected