n8n int cleaning

This commit is contained in:
alma 2025-05-18 09:06:59 +02:00
parent 93d9cc8a78
commit 6e29074f5c

View File

@ -32,12 +32,25 @@ export class N8nService {
throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
}
// Handle allEntries format
const responseText = await response.text();
console.log('Raw response from n8n:', responseText);
// Handle 'allEntries' response
if (responseText === 'allEntries') {
console.log('Received allEntries response, workflow triggered successfully');
return {
success: true,
results: {
leantimeProjectId: null,
outlineCollectionId: null,
rocketChatChannelId: null,
giteaRepositoryUrl: null
}
};
}
try {
// Try to parse as JSON first
// Try to parse as JSON
const result = JSON.parse(responseText);
console.log('Parsed JSON response:', JSON.stringify(result, null, 2));