This commit is contained in:
2023-09-20 17:33:25 +02:00
parent f8028921c3
commit 006c09ce66
7 changed files with 20 additions and 7 deletions

View File

@@ -1,7 +1,11 @@
import { type ServiceHandler } from '../service';
export const handle: ServiceHandler = () => {
const res = { logo: 'https://cdn.rawgit.com/pi-hole/graphics/master/Vortex/Vortex.svg' };
export const handle: ServiceHandler = ({ fetch, config }) => {
const url = config.url + '/api.php?summaryRaw&auth=' + config.api_token;
return res;
return {
logo: 'https://cdn.rawgit.com/pi-hole/graphics/master/Vortex/Vortex.svg',
raw: fetch(url).then((raw) => raw.json()),
url: url
};
};