blob: ab4d684fdf0e9e4dec6fcd23ec8b0bba6402024e [file] [log] [blame]
import { Machines, MachinesSchema } from "config";
export class MachineManager {
constructor(private readonly apiAddr: string) {}
async getUserMachines(username: string): Promise<Machines> {
const response = await fetch(`${this.apiAddr}/user/${username}/node`);
return MachinesSchema.parse(await response.json());
}
}