fix: correct POST body field name and state enum values in tag components

This commit is contained in:
Jennie Robinson Faber 2026-04-05 16:25:10 +01:00
parent 2c8529aed9
commit 3551f19772
2 changed files with 3 additions and 3 deletions

View file

@ -31,9 +31,9 @@ const props = defineProps({
const emit = defineEmits(["update:modelValue", "suggest"]); const emit = defineEmits(["update:modelValue", "suggest"]);
const options = [ const options = [
{ label: "Can help", value: "can_help" }, { label: "Can help", value: "help" },
{ label: "Interested", value: "interested" }, { label: "Interested", value: "interested" },
{ label: "Need help", value: "need_help" }, { label: "Need help", value: "seeking" },
]; ];
function getState(slug) { function getState(slug) {

View file

@ -60,7 +60,7 @@ async function submit() {
try { try {
await $fetch("/api/tags/suggest", { await $fetch("/api/tags/suggest", {
method: "POST", method: "POST",
body: { name: tagName.value.trim(), pool: props.pool }, body: { label: tagName.value.trim(), pool: props.pool },
}); });
success.value = true; success.value = true;
} catch (e) { } catch (e) {