diff --git a/src/components/DashboardPage.tsx b/src/components/DashboardPage.tsx index 01bf89a..ced4050 100644 --- a/src/components/DashboardPage.tsx +++ b/src/components/DashboardPage.tsx @@ -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 :

SSL is enabled!

} diff --git a/src/nws-api/calls.ts b/src/nws-api/calls.ts index 9efae6b..aacf0d4 100644 --- a/src/nws-api/calls.ts +++ b/src/nws-api/calls.ts @@ -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) },