캐릭터 챗봇 #74

Merged
klaus merged 33 commits from test into main 2025-09-10 06:26:03 +00:00
2 changed files with 8 additions and 9 deletions
Showing only changes of commit 062bb4f7b2 - Show all commits

View File

@ -74,16 +74,10 @@ async function updateCharacter(characterData, image = null) {
}) })
} }
// 캐릭터 삭제
async function deleteCharacter(id) {
return Vue.axios.delete(`/api/admin/characters/${id}`)
}
export { export {
getCharacterList, getCharacterList,
searchCharacters, searchCharacters,
getCharacter, getCharacter,
createCharacter, createCharacter,
updateCharacter, updateCharacter
deleteCharacter
} }

View File

@ -251,7 +251,7 @@
</template> </template>
<script> <script>
import { getCharacterList, searchCharacters, deleteCharacter as apiDeleteCharacter } from '@/api/character' import { getCharacterList, searchCharacters, updateCharacter } from '@/api/character'
export default { export default {
name: "CharacterList", name: "CharacterList",
@ -349,7 +349,12 @@ export default {
this.is_loading = true this.is_loading = true
try { try {
await apiDeleteCharacter(this.selected_character.id); // isActive false
const updateData = {
id: this.selected_character.id,
isActive: false
};
await updateCharacter(updateData);
this.closeDeleteDialog(); this.closeDeleteDialog();
this.notifySuccess('삭제되었습니다.'); this.notifySuccess('삭제되었습니다.');
await this.getCharacters(); await this.getCharacters();