fix complaints/violations/matches statistick
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user