timer on notifications
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m30s
deploy to production / deploy-frontend (push) Successful in 32s
deploy to production / deploy-backend (push) Successful in 18s
Build and test FrontEnd / Build-frontend (push) Successful in 30s

This commit is contained in:
Debucquoy Anthony 2024-04-22 09:09:53 +02:00
parent af8bc8872d
commit 060526c20d
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -2,9 +2,14 @@ import { ref } from 'vue'
import { restGet, restPost } from '@/rest/restConsumer.js'
export const notifications = ref([]);
let timerSet = false
export function fetchNotifications(){
restGet("/notifications").then( e => notifications.value = e );
if(!timerSet){
timerSet = true;
setTimeout(() => {timerSet = false; fetchNotifications()}, 5000);
}
}
export function archiveNotification(id){