Skip to content

Modern Docker Management, Designed for Everyone

576 B
Raw Blame
import type { DashboardSnapshot } from '#lib/types/shared.js';

import BaseAPIService from './api-service';

interface GetDashboardOptions {
	debugAllGood?: boolean;
}

class DashboardService extends BaseAPIService {
	async getDashboardForEnvironment(environmentId: string, options?: GetDashboardOptions): Promise<DashboardSnapshot> {
		const params = options?.debugAllGood ? { debugAllGood: 'true' } : undefined;
		return this.handleResponse(this.api.get(`/environments/${environmentId}/dashboard`, { params }));
	}
}

export const dashboardService = new DashboardService();