forked from projects/fipamo
25 lines
556 B
PHP
25 lines
556 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\API;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use Illuminate\Http\Request;
|
||
|
use App\Services\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');
|
||
|
}
|
||
|
}
|