Creating File Statistics page.

This commit is contained in:
Roland 2022-12-15 11:48:46 -07:00
parent fef8e123a0
commit e24990aae2
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 165 additions and 2 deletions

View file

@ -661,3 +661,18 @@ export async function getAPIStatus() {
let response = await apiGet(`${API_URI}/echo`);
return response.status === 200;
}
export async function getFileStatistics() {
let response = await apiGet(`${API_URI}/files/statistics`);
if (response.status === 200) {
const contents = await response.json();
return contents['statistics'];
} else {
toast({
type: 'error',
title: 'Error!',
description: 'Unable to get file statistics',
time: 5000,
})
}
}