fix ssl button
This commit is contained in:
parent
a2f0a3e1ed
commit
bed27ef9a2
|
@ -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>
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue