18 lines
403 B
TypeScript
18 lines
403 B
TypeScript
// @ts-ignore
|
|
const addr = import.meta.env.VITE_APIHOST;
|
|
|
|
export async function getWelcomeMessage(): Promise<string> {
|
|
const res = await fetch(`${addr}/docs/welcome`, {
|
|
method: "GET",
|
|
credentials: 'include',
|
|
});
|
|
if (res.ok) {
|
|
const out = res.json();
|
|
if (!out) {
|
|
return null;
|
|
}
|
|
return out;
|
|
} else {
|
|
return null;
|
|
}
|
|
} |