remove build artifacts that should not be checked in
This commit is contained in:
parent
f4be03ceba
commit
3cb21bf5cf
102 changed files with 461 additions and 424 deletions
|
|
@ -15,7 +15,10 @@
|
|||
|
||||
async function loadAliases(name: string) {
|
||||
try {
|
||||
const res = await fetch(`/api/domains/${encodeURIComponent(name)}/aliases`);
|
||||
const token = localStorage.getItem('token');
|
||||
const res = await fetch(`/api/domains/${encodeURIComponent(name)}/aliases`, {
|
||||
headers: { Authorization: `Bearer ${token}` }
|
||||
});
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
aliases = data.data || [];
|
||||
|
|
@ -29,9 +32,13 @@
|
|||
|
||||
async function createAlias() {
|
||||
try {
|
||||
const token = localStorage.getItem('token');
|
||||
const res = await fetch(`/api/domains/${encodeURIComponent(domainName)}/aliases`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${token}`
|
||||
},
|
||||
body: JSON.stringify(newAlias)
|
||||
});
|
||||
if (res.ok) {
|
||||
|
|
@ -50,7 +57,11 @@
|
|||
async function deleteAlias(id: number) {
|
||||
if (!confirm('Delete this alias?')) return;
|
||||
try {
|
||||
await fetch(`/api/domains/${encodeURIComponent(domainName)}/aliases/${id}`, { method: 'DELETE' });
|
||||
const token = localStorage.getItem('token');
|
||||
await fetch(`/api/domains/${encodeURIComponent(domainName)}/aliases/${id}`, {
|
||||
method: 'DELETE',
|
||||
headers: { Authorization: `Bearer ${token}` }
|
||||
});
|
||||
await loadAliases(domainName);
|
||||
} catch (e) {
|
||||
console.error('Failed to delete alias:', e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue