finish notifications featur
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user