I broke the topflix page lol

This commit is contained in:
Cooper Ransom 2024-04-01 23:06:58 -04:00
parent d9515e7d5b
commit 9f15be43c0
3 changed files with 6 additions and 6 deletions

View file

@ -85,7 +85,7 @@ function ConfigValue(props: {
}
async function getRecentPlayedItems() {
const response = await fetch(BACKEND_URL);
const response = await fetch(`${BACKEND_URL}/metrics`);
const text = await response.text();
const regex =
@ -119,7 +119,7 @@ async function getRecentPlayedItems() {
}
async function getTotalViews() {
const response = await fetch(BACKEND_URL);
const response = await fetch(`${BACKEND_URL}/metrics`);
const text = await response.text();
// Add up all mw_media_watch_count entries
@ -139,7 +139,7 @@ async function getTotalViews() {
}
function getProcessStartTime(): Promise<string> {
return fetch(BACKEND_URL)
return fetch(`${BACKEND_URL}/metrics`)
.then((response) => response.text())
.then((text) => {
const regex = /process_start_time_seconds (\d+)/;

View file

@ -25,7 +25,7 @@ function ConfigValue(props: { name: string; children?: ReactNode }) {
}
async function getTopSources() {
const response = await fetch(BACKEND_URL);
const response = await fetch(`${BACKEND_URL}/metrics`);
const text = await response.text();
const regex =

View file

@ -6,7 +6,7 @@ import { conf } from "@/setup/config";
import { BACKEND_URL } from "@/setup/constants";
async function getAccountNumber() {
const response = await fetch(BACKEND_URL);
const response = await fetch(`${BACKEND_URL}/metrics`);
const text = await response.text();
// Adjusted regex to match any hostname
@ -27,7 +27,7 @@ async function getAccountNumber() {
}
async function getAllAccounts() {
const response = await fetch(BACKEND_URL);
const response = await fetch(`${BACKEND_URL}/metrics`);
const text = await response.text();
const regex = /mw_user_count{namespace="movie-web"} (\d+)/;