<?php

namespace App\Master\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Services\AutoTraderIntegrationsApi;
use Illuminate\Http\JsonResponse;

class AutoTraderIntegrationController extends Controller
{
    public function __construct(
        protected AutoTraderIntegrationsApi $api
    ) {
    }

    public function index(): JsonResponse
    {
        return response()->json($this->api->getIntegrations());
    }

    public function show(string $integrationId): JsonResponse
    {
        return response()->json($this->api->getIntegration($integrationId));
    }
}
