new uptime monitors + half-completed create container deployment flow

This commit is contained in:
Nicholas Orlowsky 2023-01-17 01:06:38 -06:00
parent ddb20ee17c
commit 847d11c841
No known key found for this signature in database
GPG key ID: 3845F78A73B14100
16 changed files with 550 additions and 84 deletions

View file

@ -1,4 +1,4 @@
import {Blog, Incident, Service, SessionKey, UptimeResponse} from "./types";
import {Blog, Incident, Namespace, Service, SessionKey, UptimeResponse} from "./types";
export async function getUptime(): Promise<UptimeResponse> {
let response: Response = await fetch('https://api-nws.nickorlow.com/uptime');
@ -40,4 +40,12 @@ export async function getSessionKey(accountId: string, password: string): Promis
return sessionKey;
}
export async function getNamespaces(accountId: string, skey: SessionKey): Promise<Namespace[]> {
let response: Response = await fetch('https://api-nws.nickorlow.com/'+accountId+'/namespaces', {
headers: {
Authorization: skey.id
}
});
let namespaces: Namespace[] = await response.json();
return namespaces;
}