n8n int cleaning
This commit is contained in:
parent
39a6ca9cb3
commit
2d25992870
@ -378,7 +378,19 @@ export function MissionsAdminPanel() {
|
|||||||
|
|
||||||
// Handle mission submission
|
// Handle mission submission
|
||||||
const handleSubmitMission = async () => {
|
const handleSubmitMission = async () => {
|
||||||
if (!validateMission()) return;
|
console.log('Starting mission submission...');
|
||||||
|
console.log('Current mission data:', missionData);
|
||||||
|
console.log('Guardians:', {
|
||||||
|
gardienDuTemps,
|
||||||
|
gardienDeLaParole,
|
||||||
|
gardienDeLaMemoire
|
||||||
|
});
|
||||||
|
console.log('Volunteers:', volontaires);
|
||||||
|
|
||||||
|
if (!validateMission()) {
|
||||||
|
console.log('Mission validation failed');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setIsSubmitting(true);
|
setIsSubmitting(true);
|
||||||
try {
|
try {
|
||||||
@ -406,7 +418,9 @@ export function MissionsAdminPanel() {
|
|||||||
body: JSON.stringify(formattedData),
|
body: JSON.stringify(formattedData),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('Response status:', response.status);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
console.log('Response data:', data);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(data.error || 'Failed to create mission');
|
throw new Error(data.error || 'Failed to create mission');
|
||||||
|
|||||||
@ -23,8 +23,13 @@ export class N8nService {
|
|||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('Webhook response status:', response.status);
|
||||||
|
console.log('Webhook response headers:', Object.fromEntries(response.headers.entries()));
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
const errorText = await response.text();
|
||||||
|
console.error('Webhook error response:', errorText);
|
||||||
|
throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user