fix ssl button

This commit is contained in:
Nicholas Orlowsky 2023-11-17 17:03:20 -05:00
parent a2f0a3e1ed
commit bed27ef9a2
2 changed files with 3 additions and 3 deletions

View file

@ -54,7 +54,7 @@ export default function DashboardPage() {
if (rawSession != null) {
let session: SessionKey = JSON.parse(rawSession);
await enableSSL(account!.id!, e.serviceId, session);
await enableSSL(account!.id!, e.serviceId, host.hostname, session);
}
}}>Enable SSL</a> : <p>SSL is enabled!</p>
}

View file

@ -50,8 +50,8 @@ export async function getNamespaces(accountId: string, skey: SessionKey): Promis
return namespaces;
}
export async function enableSSL(accountId: string, serviceId: string, session: SessionKey) {
await fetch('https://api-nws.nickorlow.com/service/'+accountId+'/service/'+serviceId+"/ssl", {
export async function enableSSL(accountId: string, serviceId: string, hostname: string, session: SessionKey) {
await fetch('https://api-nws.nickorlow.com/'+accountId+'/service/'+serviceId+"/hosts/"+hostname+"/ssl", {
headers: {
Authorization: btoa(session.accountId + ":" + session.id)
},