<?php

namespace App\Http\Controllers\Affiliate;

use App\Classes\Modules\Affiliate\ControllersLogic\GetAffiliateSettingsLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;

class GetAffiliateSettingsController
{
    /**
     * @param Request $request
     * @param GetAffiliateSettingsLogic $logic
     * @return JsonResponse
     * @throws \Illuminate\Auth\Access\AuthorizationException
     */
    public function get(Request $request, GetAffiliateSettingsLogic $logic): JsonResponse {
        Gate::authorize('manageSettings', \App\Models\Affiliate::class);
        return $logic->execute($request);
    }
}

