mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
refactor: remove unused response variables in database, git, node, project, schedule, spider, task modules
This commit is contained in:
@@ -184,7 +184,7 @@ export function configureDatabaseTools(server: McpServer, client: CrawlabClient)
|
||||
},
|
||||
async ({ database_id }) => {
|
||||
try {
|
||||
const response = await client.deleteDatabase(database_id);
|
||||
await client.deleteDatabase(database_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
@@ -169,7 +169,7 @@ export function configureGitTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ git_id }) => {
|
||||
try {
|
||||
const response = await client.deleteGitRepo(git_id);
|
||||
await client.deleteGitRepo(git_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -200,7 +200,7 @@ export function configureGitTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ git_id }) => {
|
||||
try {
|
||||
const response = await client.cloneGitRepo(git_id);
|
||||
await client.cloneGitRepo(git_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -231,7 +231,7 @@ export function configureGitTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ git_id }) => {
|
||||
try {
|
||||
const response = await client.pullGitRepo(git_id);
|
||||
await client.pullGitRepo(git_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ export function configureNodeTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ node_id }) => {
|
||||
try {
|
||||
const response = await client.enableNode(node_id);
|
||||
await client.enableNode(node_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -154,7 +154,7 @@ export function configureNodeTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ node_id }) => {
|
||||
try {
|
||||
const response = await client.disableNode(node_id);
|
||||
await client.disableNode(node_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
@@ -155,7 +155,7 @@ export function configureProjectTools(server: McpServer, client: CrawlabClient)
|
||||
},
|
||||
async ({ project_id }) => {
|
||||
try {
|
||||
const response = await client.deleteProject(project_id);
|
||||
await client.deleteProject(project_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
@@ -189,7 +189,7 @@ export function configureScheduleTools(server: McpServer, client: CrawlabClient)
|
||||
},
|
||||
async ({ schedule_id }) => {
|
||||
try {
|
||||
const response = await client.deleteSchedule(schedule_id);
|
||||
await client.deleteSchedule(schedule_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -220,7 +220,7 @@ export function configureScheduleTools(server: McpServer, client: CrawlabClient)
|
||||
},
|
||||
async ({ schedule_id }) => {
|
||||
try {
|
||||
const response = await client.enableSchedule(schedule_id);
|
||||
await client.enableSchedule(schedule_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -251,7 +251,7 @@ export function configureScheduleTools(server: McpServer, client: CrawlabClient)
|
||||
},
|
||||
async ({ schedule_id }) => {
|
||||
try {
|
||||
const response = await client.disableSchedule(schedule_id);
|
||||
await client.disableSchedule(schedule_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ export function configureSpiderTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ spider_id }) => {
|
||||
try {
|
||||
const response = await client.deleteSpider(spider_id);
|
||||
await client.deleteSpider(spider_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -347,7 +347,7 @@ export function configureSpiderTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ spider_id, file_path, content }) => {
|
||||
try {
|
||||
const response = await client.saveSpiderFile(spider_id, file_path, content);
|
||||
await client.saveSpiderFile(spider_id, file_path, content);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ export function configureTaskTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ task_id }) => {
|
||||
try {
|
||||
const response = await client.cancelTask(task_id);
|
||||
await client.cancelTask(task_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
@@ -148,7 +148,7 @@ export function configureTaskTools(server: McpServer, client: CrawlabClient) {
|
||||
},
|
||||
async ({ task_id }) => {
|
||||
try {
|
||||
const response = await client.deleteTask(task_id);
|
||||
await client.deleteTask(task_id);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user