Clyde/frontend/src/rest/notifications.js

13 lines
343 B
JavaScript
Raw Normal View History

2024-04-17 21:41:29 +02:00
import { ref } from 'vue'
import { restGet, restPost } from '@/rest/restConsumer.js'
export const notifications = ref([]);
2024-04-17 21:41:29 +02:00
export function fetchNotifications(){
restGet("/notifications").then( e => notifications.value = e );
}
export function archiveNotification(id){
restPost("/notifications/" + id).then( e => fetchNotifications() );
}