fix: correct POST body field name and state enum values in tag components
This commit is contained in:
parent
2c8529aed9
commit
3551f19772
2 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue