comments working

This commit is contained in:
isUnknown 2025-01-15 14:18:48 +01:00
parent 375bed1d01
commit 0b472988a2
14 changed files with 107 additions and 59 deletions

View file

@ -1,4 +1,5 @@
import { defineStore } from "pinia";
import { defineStore, storeToRefs } from "pinia";
import { usePageStore } from "./page.js";
import uniqid from "uniqid";
export const useApiStore = defineStore("api", () => {
@ -142,11 +143,17 @@ export const useApiStore = defineStore("api", () => {
}
}
async function readNotification(comment) {
/**
*
* @param {string} comment
* @param {string} projectId UUID or URI
* @returns status with message if error
*/
async function readNotification(comment, projectId) {
const headers = {
method: "POST",
body: JSON.stringify({
projectUuid: comment.location.project.uuid,
projectId,
notificationId: comment.id,
}),
};