fix
This commit is contained in:
@@ -288,7 +288,7 @@ import { ref, computed, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useToast } from 'vue-toastification'
|
||||
import axios from '@/utils/axios'
|
||||
import axios, { postJson } from '@/utils/axios'
|
||||
import { getMediaUrl, uploadFormData } from '@/utils/axios'
|
||||
import { formatRelativeDateInFrenchTimezone } from '@/utils/dateUtils'
|
||||
import {
|
||||
@@ -355,14 +355,14 @@ async function createPost() {
|
||||
|
||||
creating.value = true
|
||||
try {
|
||||
const response = await axios.post('/api/posts', {
|
||||
const data = await postJson('/api/posts', {
|
||||
content: newPost.value.content,
|
||||
image_url: newPost.value.image_url,
|
||||
mentioned_user_ids: newPost.value.mentioned_user_ids
|
||||
})
|
||||
|
||||
// Add new post to the beginning of the list
|
||||
posts.value.unshift(response.data)
|
||||
posts.value.unshift(data)
|
||||
|
||||
// Forcer le rafraîchissement de la date immédiatement
|
||||
dateRefreshKey.value++
|
||||
|
||||
Reference in New Issue
Block a user