fixes to new message
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
eb08f5cb46
commit
c2ef9797f8
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { addDoc, collection, serverTimestamp } from 'firebase/firestore'
|
||||
import { addDoc, collection, serverTimestamp, Timestamp } from 'firebase/firestore'
|
||||
import { useToast } from 'vue-toastification'
|
||||
|
||||
definePageMeta({
|
||||
@ -38,7 +38,6 @@ const form = ref({
|
||||
const sendNews = async () => {
|
||||
disableButtons.value = true
|
||||
|
||||
|
||||
try {
|
||||
const idToken = await auth.value.currentUser.getIdToken(true)
|
||||
console.log(idToken)
|
||||
@ -61,13 +60,12 @@ const sendNews = async () => {
|
||||
});
|
||||
|
||||
if (news.value) {
|
||||
news.value.push({
|
||||
news.value.unshift({
|
||||
title: form.value.title,
|
||||
description: form.value.description,
|
||||
date: Date.now()
|
||||
date: Timestamp.now()
|
||||
})
|
||||
}
|
||||
|
||||
toast.success('Bericht is verstuurd')
|
||||
|
||||
navigateTo('/news')
|
||||
|
Loading…
Reference in New Issue
Block a user