users / notifications : temporary disabled notifications system

This commit is contained in:
isUnknown 2024-11-21 19:43:49 +01:00
parent 9167519388
commit ef6375f4cc
15 changed files with 302 additions and 113 deletions

View file

@ -212,6 +212,29 @@ export const useApiStore = defineStore("api", () => {
}
}
async function validateBrief(briefUri) {
const headers = {
method: "POST",
body: JSON.stringify({
pageUri: briefUri,
}),
};
try {
const response = await fetch("/validate-brief.json", headers);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
if (data.error) {
throw new Error(data);
} else {
return data;
}
} catch (error) {
throw error;
}
}
async function readAllNotifications() {
try {
const response = await fetch("/read-all-notifications.json");
@ -239,5 +262,6 @@ export const useApiStore = defineStore("api", () => {
replyComment,
readNotification,
readAllNotifications,
validateBrief,
};
});