<?php

namespace App\Http\Controllers\Account;

use App\Classes\Modules\ControllersLogic\Accounts\RegisterAccountLogic;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;

class RegisterAccountController extends Controller
{
    /**
     * @param Request $request
     * @param RegisterAccountLogic $logic
     * @return JsonResponse
     * @throws \App\Classes\Modules\ControllerLogic\Exceptions\InternalServerErrorException
     * @throws \App\Classes\Modules\ControllerLogic\Exceptions\MalformedRequestException
     */
    public function register(Request $request, RegisterAccountLogic $logic): JsonResponse
    {
        return $logic->execute($request);
    }
}
