ro
35c22913f8
there was a fatal error in the init process because it was looking for a class that had been moved but the reference had not been updated, which is now corrected
31 lines
763 B
PHP
31 lines
763 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use App\Services\UpKeep\InitService;
|
|
|
|
class InitAPIController extends Controller
|
|
{
|
|
protected $init;
|
|
|
|
public function __construct(InitService $initService)
|
|
{
|
|
$this->init = $initService;
|
|
}
|
|
|
|
//init stuff
|
|
public function setupFresh(Request $request)
|
|
{
|
|
$result = $this->init->fresh(json_decode($request->getContent()));
|
|
return response()->json($result)->header('Content-Type', 'application/json');
|
|
}
|
|
|
|
public function setupRestore(Request $request)
|
|
{
|
|
$result = $this->init->restore($request);
|
|
return response()->json($result)->header('Content-Type', 'application/json');
|
|
}
|
|
}
|