From ec50ed3f387505cd704981201aff030e9c5f6806 Mon Sep 17 00:00:00 2001 From: Jarlem Red de Peralta Date: Sun, 20 Nov 2022 15:00:41 +0800 Subject: [PATCH] feat(post): allow updating attached tags --- components/post/multiviewer/viewer/update_post_form.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/post/multiviewer/viewer/update_post_form.vue b/components/post/multiviewer/viewer/update_post_form.vue index 03dca2a4b..131dd674c 100644 --- a/components/post/multiviewer/viewer/update_post_form.vue +++ b/components/post/multiviewer/viewer/update_post_form.vue @@ -329,8 +329,10 @@ function updatePost(): void { const hasUpdatedTags = ref(true) function updateTags() { + const tagIDs = tags.value.map(tag => tag.id) hasUpdatedTags.value = false - // Add code to update the tags + fetcher.updateAttachedTags(props.modelValue.id, tagIDs) + .then() hasUpdatedTags.value = true }