add spentBalance
This commit is contained in:
@@ -98,6 +98,7 @@ export async function getViolationFilesArray() {
|
||||
|
||||
if (response.ok) {
|
||||
let parsed = await response.json();
|
||||
|
||||
if (parsed.length) {
|
||||
return parsed;
|
||||
} else {
|
||||
@@ -150,6 +151,15 @@ export async function fetchViolationStats() {
|
||||
export async function getFileViolations(fileId: string, page: number, status?: string) {
|
||||
const token = await getSessionData('token');
|
||||
|
||||
console.log({
|
||||
file_id: fileId,
|
||||
page: page,
|
||||
size: 5,
|
||||
sort_direction: "desc",
|
||||
token: token,
|
||||
status: status
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
||||
method: 'POST',
|
||||
@@ -173,6 +183,8 @@ export async function getFileViolations(fileId: string, page: number, status?: s
|
||||
|
||||
if (response.ok) {
|
||||
let parsed = await response.json();
|
||||
console.log(parsed);
|
||||
|
||||
if (parsed.message_body) {
|
||||
return parsed.message_body;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user