mirror of
				https://gitea.com/gitea/gitea-mcp.git
				synced 2025-10-30 09:51:50 +00:00 
			
		
		
		
	refactor(args): request argument access and update dependencies (#42)
- Update dependencies to newer versions in go.mod - Refactor all request argument accesses to use req.GetArguments() instead of direct access to req.Params.Arguments - Change variable declaration for ListRepoCommitsTool from a grouped var block to a single var statement for consistency Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/42 Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
		| @@ -59,11 +59,11 @@ func GetUserInfoFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolR | ||||
|  | ||||
| func GetUserOrgsFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { | ||||
| 	log.Debugf("Called GetUserOrgsFn") | ||||
| 	page, ok := req.Params.Arguments["page"].(float64) | ||||
| 	page, ok := req.GetArguments()["page"].(float64) | ||||
| 	if !ok || page < 1 { | ||||
| 		page = 1 | ||||
| 	} | ||||
| 	pageSize, ok := req.Params.Arguments["pageSize"].(float64) | ||||
| 	pageSize, ok := req.GetArguments()["pageSize"].(float64) | ||||
| 	if !ok || pageSize < 1 { | ||||
| 		pageSize = 100 | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user