discord meow
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 54s

This commit is contained in:
Lee 2024-04-16 23:04:55 +01:00
parent e470757ea0
commit 837462e379

@ -44,14 +44,11 @@ async function getData(): Promise<CachedEndpointStatus> {
export async function generateMetadata(): Promise<Metadata> {
const { endpoints } = await getData();
const maxStatusLength = Math.max(...Object.values(endpoints).map((status) => formatStatus(status).length));
let description = "The current status of Mojang Services\n\n";
let description = "The current status of Mojang Services";
description += Object.entries(endpoints)
.map(([url, status]) => {
const formattedStatus = formatStatus(status);
const padding = " ".repeat(maxStatusLength - formattedStatus.length); // Create padding based on the difference in length
return `${url}: ${padding}${formattedStatus}`;
return `**${url}**: ${formatStatus(status)}`;
})
.join("\n");