forked from projects/fipamo
ro
b9b04f1ab2
start building out the new version of the page editing api while making some changes to the original scripts for added flexibility and using the full range of HTTP methods that weren't being used before. currenlty, it's just an end to end test to make sure the plumbing works as it should data is being passed and can be processed. now that it all works, the guts of page editing can be completed update sortablejs to the latest since it's been awhile and got rid of the old version
31 lines
682 B
PHP
31 lines
682 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\AuthService;
|
|
use Illuminate\Http\Request;
|
|
|
|
class PageAPIController extends Controller
|
|
{
|
|
public function __construct(
|
|
AuthService $authService
|
|
) {
|
|
$this->auth = $authService;
|
|
}
|
|
|
|
public function write(Request $request)
|
|
{
|
|
$body = json_decode($request->getContent());
|
|
//var_dump($body);
|
|
|
|
$result = [
|
|
'message' => 'API IS CONNECTED',
|
|
'type' => 'apiTesting',
|
|
'uuid' => $body->uuid,
|
|
];
|
|
|
|
return response()->json($result)->header('Content-Type', 'application/json');
|
|
}
|
|
}
|