fix
This commit is contained in:
1 parent
a851885bcf
commit
29e11dedae
4 files changed
+40
-92
No files matched your search
@@ -249,10 +249,11 @@
|
||||
|
||||
<script>
|
||||
import {computed, ref} from "vue";
|
||||
import {createVote, getVotes} from "@/utils/axios-api";
|
||||
import { createVote } from "@/utils/axios-api";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
emits: ['updating'],
|
||||
setup(props, {emit}) {
|
||||
const step = ref(0);
|
||||
const isVoteCreated = ref(false);
|
||||
const form = ref({
|
||||
@@ -317,13 +318,7 @@ export default {
|
||||
const response = await createVote(form.value);
|
||||
console.log("Голосование успешно создано:", response);
|
||||
isVoteCreated.value = true;
|
||||
getVotes('active')
|
||||
.then(data => {
|
||||
console.log('Активные голосования:', data);
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('Ошибка:', err);
|
||||
});
|
||||
emit('updating', 'active')
|
||||
} catch (error) {
|
||||
console.error("Ошибка при создании голосования:", error);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user