finish notifications featur

This commit is contained in:
smanylov
2026-04-06 13:02:38 +07:00
parent 1fe49c24e8
commit b377c11c41
6 changed files with 62 additions and 20 deletions
+4 -4
View File
@@ -62,9 +62,9 @@ export async function fetchAllNotifications(page: number = 0, size: number = 10)
page: page,
size: size,
sortBy: "createdAt",
sortDirection: "DESC",
sortDirection: "ASC", //DESC, ASC
types: [], //"SEARCH_RESULT", "MONITORING_RESULT"
statuses: [] //"NEW"
statuses: ["NEW", "READIED"] //"NEW"
}
}),
headers: {
@@ -76,7 +76,7 @@ export async function fetchAllNotifications(page: number = 0, size: number = 10)
if (response.ok) {
let parsed = await response.json();
if (parsed?.message_body) {
if (parsed?.message_code === 0) {
return parsed?.message_body
} else {
throw parsed;
@@ -114,7 +114,7 @@ export async function notificationsMarkAsRead(ids: number[]) {
if (response.ok) {
let parsed = await response.json();
if (parsed?.message_body) {
if (parsed?.message_code === 0) {
return parsed?.message_body
} else {
throw parsed;