fix complaints/violations/matches statistick

This commit is contained in:
smanylov
2026-05-25 13:40:49 +07:00
parent 65e0c2ed62
commit ffcd5fc535
5 changed files with 11 additions and 8 deletions
+4 -1
View File
@@ -209,8 +209,9 @@ export async function fetchViolationAnalyticStatistic(group: 'domain' | 'tld') {
}
}
export async function fetchViolationStatistic() {
export async function fetchViolationStatistic(id: string) {
const token = await getSessionData('token');
console.log(`fileId => ${id}`)
try {
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
@@ -220,6 +221,7 @@ export async function fetchViolationStatistic() {
msg_id: 30010,
message_body: {
token: token,
file_id: id
}
}),
headers: {
@@ -230,6 +232,7 @@ export async function fetchViolationStatistic() {
if (response.ok) {
let parsed = await response.json();
console.log(parsed);
if (parsed?.message_body) {
return parsed?.message_body;