const BASE = '/api/github';
async function request(url) {
    const res = await fetch(url);
    const data = await res.json().catch(() => ({}));
    if (!res.ok) {
        throw new Error(typeof data.erro === 'string' ? data.erro : `HTTP ${res.status}`);
    }
    return data;
}
export const api = {
    getAppInfo() {
        return request(`${BASE}/app-info`);
    }
};
//# sourceMappingURL=api.js.map