add spentBalance

This commit is contained in:
smanylov
2026-03-27 22:31:34 +07:00
parent 0df34bdb1c
commit 534e18bbd4
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -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 {