Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

867 B
Raw Blame
import type { OrganizationChart, OrganizationSeatRuntime } from "@/lib/contracts/organization";
export type OrganizationPayload = { chart: OrganizationChart; runtime: OrganizationSeatRuntime[] };
async function json<T>(input: RequestInfo, init?: RequestInit): Promise<T> { const response = await fetch(input, { ...init, cache: "no-store", headers: { "Content-Type": "application/json", ...(init?.headers ?? {}) } }); const body = await response.json().catch(() => ({})); if (!response.ok) throw new Error(typeof body.error === "string" ? body.error : `request failed (${response.status})`); return body as T; }
export const getOrganization = () => json<OrganizationPayload>("/api/v1/organization");
export const mutateOrganization = (body: Record<string, unknown>) => json<OrganizationPayload>("/api/v1/organization", { method: "POST", body: JSON.stringify(body) });