users / notifications : temporary disabled notifications system
This commit is contained in:
parent
9167519388
commit
ef6375f4cc
15 changed files with 302 additions and 113 deletions
|
|
@ -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,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue