(change): Client security

This commit is contained in:
dbob16 committed 2026-09-10 17:58:25 -04:00
1 parent a11c313a8e
commit 103f1cf3c4
16 files changed
+177 -115

No files matched your search

@@ -5,6 +5,7 @@
import { resolve } from '$app/paths';
let { data } = $props();
let { tamClientID } = $derived(data);
const pageTitle = 'Prefixes | TAM';
@@ -56,7 +57,7 @@
if (editPrefix.prefix) {
const req = await fetch('/api/prefixes', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
headers: { 'Content-Type': 'application/json', 'TAM-CLIENT-ID': tamClientID },
body: JSON.stringify([editPrefix])
});
if (req.ok) window.location.reload();
@@ -125,7 +126,8 @@
class={bS[prefix.color]}
onclick={async () => {
const res = await fetch(`/api/prefixes?p=${prefix.prefix}`, {
method: 'DELETE'
method: 'DELETE',
headers: { 'TAM-CLIENT-ID': tamClientID }
});
if (res.ok) window.location.reload();
}}>Delete</button