Drop redundant method default in webhook/http nodes

Webhook and HTTP nodes are always created with a method, so the ?? default was
dead. Make the prop required and remove the now-unused HttpMethod import,
matching the unit/operator/mode cleanup.
This commit is contained in:
Paulo Castellano 2026-06-13 17:13:32 -03:00
parent 9b3e9e8307
commit 1ac4795575
2 changed files with 4 additions and 8 deletions

View file

@ -3,18 +3,16 @@ import { IconWorld } from '@tabler/icons-vue';
import { Handle, Position } from '@vue-flow/core';
import { computed } from 'vue';
import { HttpMethod } from '@/types/automation/http-method';
const props = defineProps<{
data: {
url?: string;
method?: string;
method: string;
};
selected?: boolean;
}>();
const summary = computed(() => {
const method = (props.data.method ?? HttpMethod.Get).toUpperCase();
const method = props.data.method.toUpperCase();
const url = props.data.url;
if (!url) return method;
let host = url;

View file

@ -3,18 +3,16 @@ import { IconWebhook } from '@tabler/icons-vue';
import { Handle, Position } from '@vue-flow/core';
import { computed } from 'vue';
import { HttpMethod } from '@/types/automation/http-method';
const props = defineProps<{
data: {
url?: string;
method?: string;
method: string;
};
selected?: boolean;
}>();
const summary = computed(() => {
const method = (props.data.method ?? HttpMethod.Post).toUpperCase();
const method = props.data.method.toUpperCase();
const url = props.data.url || 'https://…';
return `${method} · ${url}`;
});