Prettier Changes

This commit is contained in:
Neshura 2024-01-02 02:39:22 +01:00
parent e9c805c36b
commit 1537f8a410
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
10 changed files with 69 additions and 79 deletions
src/routes

View file

@ -1,8 +1,8 @@
<svelte:head>
<title>Home</title>
<meta name="description" content="Landing Page for neshweb.net">
<title>Home</title>
<meta name="description" content="Landing Page for neshweb.net" />
</svelte:head>
<div class="h-full overflow-auto">
<h1>Home Page</h1>
<h1>Home Page</h1>
</div>

View file

@ -1,4 +1,4 @@
<svelte:head>
<title>About</title>
<meta name="description" content="Information about this Website">
</svelte:head>
<title>About</title>
<meta name="description" content="Information about this Website" />
</svelte:head>

View file

@ -1,10 +1,10 @@
import * as fs from "fs";
import {json} from "@sveltejs/kit";
import * as fs from 'fs';
import { json } from '@sveltejs/kit';
export function GET() {
let content = fs.readdirSync("static/assets/icons");
let content = fs.readdirSync('static/assets/icons');
content = content.filter((entry) => entry != ".directory")
content = content.filter((entry) => entry != '.directory');
return json(content);
}
return json(content);
}

View file

@ -1,10 +1,10 @@
import * as fs from "fs";
import {json} from "@sveltejs/kit";
import * as fs from 'fs';
import { json } from '@sveltejs/kit';
export function GET() {
const content = fs.readFileSync("static/data/services.json").toString();
const content = fs.readFileSync('static/data/services.json').toString();
let data = JSON.parse(content)
let data = JSON.parse(content);
return json(data);
}
return json(data);
}

View file

@ -1,4 +1,4 @@
<svelte:head>
<title>Servers</title>
<meta name="description" content="Overview of Game Servers running on neshweb.net">
</svelte:head>
<title>Servers</title>
<meta name="description" content="Overview of Game Servers running on neshweb.net" />
</svelte:head>

View file

@ -9,27 +9,26 @@
let icons: readonly string[] = $state.frozen([]);
async function get(url: string): Promise<any> {
let res = await fetch(url)
let res = await fetch(url);
if (res.ok) {
let data = await res.json()
return data
}
else {
return Promise.reject()
let data = await res.json();
return data;
} else {
return Promise.reject();
}
}
$effect(() => {
get("/data/services").then((data: Service[]) => {
services = data
})
})
get('/data/services').then((data: Service[]) => {
services = data;
});
});
$effect(() => {
get("/assets/icons").then((data: string[]) => {
icons = data
})
})
get('/assets/icons').then((data: string[]) => {
icons = data;
});
});
</script>
<svelte:head>