some blogging
This commit is contained in:
parent
b9e96ebf9c
commit
48b46df249
8 changed files with 1582 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
import {Incident, UptimeResponse} from "./types";
|
||||
import {Blog, Incident, UptimeResponse} from "./types";
|
||||
|
||||
export async function getUptime(): Promise<UptimeResponse> {
|
||||
let response: Response = await fetch('https://api-nws.nickorlow.com/uptime');
|
||||
|
@ -12,3 +12,10 @@ export async function getIncidents(): Promise<Incident[]> {
|
|||
return incidents;
|
||||
}
|
||||
|
||||
export async function getBlogs(): Promise<Blog[]> {
|
||||
let response: Response = await fetch('https://api-nws.nickorlow.com/blogs');
|
||||
let blogs: Blog[] = await response.json();
|
||||
return blogs;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue