lots
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Lucent\Http\Controller\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Lucent\Channel\ChannelContext;
|
||||
use Lucent\Schema\FieldRepo;
|
||||
use Lucent\Schema\SchemaRepo;
|
||||
use function Lucent\Response\fail;
|
||||
use function Lucent\Response\ok;
|
||||
|
||||
|
||||
class FieldController extends Controller
|
||||
{
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
try {
|
||||
$schema = SchemaRepo::findByName($request->input("schema"));
|
||||
FieldRepo::create($schema, $request->input("field"));
|
||||
} catch (\Throwable $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
return ok();
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
try {
|
||||
$schema = SchemaRepo::findByName($request->input("schema"));
|
||||
FieldRepo::update($schema, $request->input("field"));
|
||||
} catch (\Throwable $th) {
|
||||
return fail($th);
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,14 @@
|
||||
namespace Lucent\Http\Controller;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\Session\Session;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Lucent\Account\AccountService;
|
||||
use Lucent\Account\AuthService;
|
||||
use Lucent\Account\UserRepo;
|
||||
use Lucent\Channel\ChannelService;
|
||||
use Lucent\LucentException;
|
||||
use Lucent\Svelte\Svelte;
|
||||
use function Lucent\Response\fail;
|
||||
@@ -18,29 +20,28 @@ use function Lucent\Response\ok;
|
||||
class AuthController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly AuthService $authService,
|
||||
private readonly Svelte $svelte,
|
||||
private readonly UserRepo $userRepo,
|
||||
private readonly AuthService $authService,
|
||||
private readonly AccountService $accountService,
|
||||
private readonly ChannelService $channelService,
|
||||
private readonly Session $session,
|
||||
private readonly Svelte $svelte,
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function register(Request $request): View
|
||||
public function register(Request $request): View|RedirectResponse
|
||||
{
|
||||
$userCount = $this->userRepo->count();
|
||||
$email = $request->input("email");
|
||||
$token = $request->input("token");
|
||||
if ($this->accountService->countUsers() > 0) {
|
||||
return redirect($this->channelService->channel->lucentUrl . "/login");
|
||||
}
|
||||
|
||||
return svelte(
|
||||
|
||||
return $this->svelte->render(
|
||||
layout: "account",
|
||||
view: "register",
|
||||
title: "Create an account",
|
||||
data: [
|
||||
'email' => $email,
|
||||
'token' => $token,
|
||||
'userCount' => $userCount
|
||||
]
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
@@ -48,23 +49,15 @@ class AuthController extends Controller
|
||||
public function postRegister(Request $request): Response
|
||||
{
|
||||
|
||||
if ($this->accountService->countUsers() > 0) {
|
||||
abort(400);
|
||||
}
|
||||
|
||||
try {
|
||||
if ($request->input("isAdmin")) {
|
||||
$this->authService->registerAdmin(
|
||||
name: $request->input("name"),
|
||||
password: $request->input("password"),
|
||||
email: $request->input("email"),
|
||||
);
|
||||
} else {
|
||||
$this->authService->register(
|
||||
name: $request->input("name"),
|
||||
password: $request->input("password"),
|
||||
email: $request->input("email"),
|
||||
token: $request->input("token") ?? "",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$this->authService->registerAdmin(
|
||||
name: $request->input("name"),
|
||||
email: $request->input("email"),
|
||||
);
|
||||
} catch (LucentException $th) {
|
||||
return fail($th);
|
||||
}
|
||||
@@ -72,8 +65,12 @@ class AuthController extends Controller
|
||||
return ok();
|
||||
}
|
||||
|
||||
public function login(): View
|
||||
public function login(): View|RedirectResponse
|
||||
{
|
||||
if ($this->accountService->countUsers() == 0) {
|
||||
return redirect($this->channelService->channel->lucentUrl . "/register");
|
||||
}
|
||||
|
||||
return $this->svelte->render(
|
||||
layout: "account",
|
||||
view: "login",
|
||||
@@ -118,8 +115,8 @@ class AuthController extends Controller
|
||||
|
||||
public function logout(): RedirectResponse
|
||||
{
|
||||
session()->flush();
|
||||
return redirect("/login");
|
||||
$this->session->flush();
|
||||
return redirect($this->channelService->channel->lucentUrl . "/login");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Lucent\Http\Controller;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Lucent\Account\Auth;
|
||||
use Lucent\Channel\ChannelContext;
|
||||
use Lucent\Query\Options;
|
||||
use Lucent\Query\Reference;
|
||||
|
||||
class EdgeController extends Controller
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@@ -121,9 +121,9 @@ class FileController extends Controller
|
||||
})->toArray();
|
||||
|
||||
|
||||
$queryResult = $this->query
|
||||
$graph = $this->query
|
||||
->filter([
|
||||
"_sys.schema" => $schema->name
|
||||
"schema" => $schema->name
|
||||
])
|
||||
->limit(15)
|
||||
->skip(0)
|
||||
@@ -132,7 +132,6 @@ class FileController extends Controller
|
||||
->parentsDepth(0)
|
||||
->run();
|
||||
|
||||
$graph = $queryResult->getQueryRecords();
|
||||
return ok($graph->records->toArray());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Lucent\Http\Controller;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Lucent\Schema\FolderRepo;
|
||||
use function Lucent\Response\fail;
|
||||
use function Lucent\Response\ok;
|
||||
|
||||
class FolderController extends Controller
|
||||
{
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
try {
|
||||
$folder = FolderRepo::create($request->input("name"));
|
||||
} catch (\Lucent\LucentException $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
return ok((array)$folder);
|
||||
}
|
||||
|
||||
public function update(Request $request, string $cid)
|
||||
{
|
||||
try {
|
||||
$folder = FolderRepo::update(
|
||||
id: $request->input("id"),
|
||||
name: $request->input("name"),
|
||||
);
|
||||
} catch (\Lucent\LucentException $th) {
|
||||
return fail($th);
|
||||
}
|
||||
return ok((array)$folder);
|
||||
}
|
||||
|
||||
public function delete(Request $request, string $cid, string $folderid)
|
||||
{
|
||||
|
||||
try {
|
||||
FolderRepo::delete($folderid);
|
||||
} catch (\Lucent\LucentException $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ use function Lucent\Response\ok;
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ChannelService $channelService,
|
||||
private readonly Svelte $svelte,
|
||||
private readonly UserRepo $userRepo,
|
||||
private readonly Query $query,
|
||||
@@ -45,7 +44,7 @@ class HomeController extends Controller
|
||||
|
||||
$limit = 30;
|
||||
|
||||
$queryResult = $this->query
|
||||
$graph = $this->query
|
||||
->filter($arguments)
|
||||
->limit($limit)
|
||||
->childrenDepth(1)
|
||||
@@ -53,15 +52,12 @@ class HomeController extends Controller
|
||||
->sort($sort)
|
||||
->run();
|
||||
|
||||
|
||||
$graph = $queryResult->getQueryRecords();
|
||||
|
||||
$users = $this->userRepo->all();
|
||||
|
||||
return ok([
|
||||
"users" => $users,
|
||||
"records" => $graph->getRootRecords()->toArray(),
|
||||
"graph" => $graph->toArray(),
|
||||
"graph" => toArray($graph),
|
||||
"modalUrl" => $request->fullUrl(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ use Lucent\Account\AccountService;
|
||||
use Lucent\Account\AuthService;
|
||||
use Lucent\Account\UserRepo;
|
||||
use Lucent\Channel\ChannelService;
|
||||
use Lucent\Field\System;
|
||||
use Lucent\LucentException;
|
||||
use Lucent\Query\Operator;
|
||||
use Lucent\Query\Query;
|
||||
use Lucent\Record\Manager;
|
||||
use Lucent\Record\QueryRecord;
|
||||
use Lucent\Record\RecordService;
|
||||
use Lucent\Schema\System;
|
||||
use Lucent\Schema\Validator\ValidatorException;
|
||||
use Lucent\Svelte\Svelte;
|
||||
use function Lucent\Response\fail;
|
||||
@@ -39,13 +39,13 @@ class RecordController extends Controller
|
||||
{
|
||||
$schemaName = $request->route("schemaName");
|
||||
$users = $this->accountService->all();
|
||||
$schema = $this->channelService->channel->schemas->where("name", $schemaName)->first();
|
||||
$schema = $this->channelService->getSchema($schemaName)->get();
|
||||
$urlParams = $request->all();
|
||||
$sort = data_get($urlParams, "sort") ?? "-_sys.updatedAt";
|
||||
$filter = data_get($urlParams, "filter") ?? [];
|
||||
$arguments = array_merge([
|
||||
"_sys.schema" => $schema->name,
|
||||
"_sys.status_in" => "draft,published",
|
||||
"schema" => $schema->name,
|
||||
"status_in" => "draft,published",
|
||||
], $filter);
|
||||
|
||||
|
||||
@@ -53,38 +53,32 @@ class RecordController extends Controller
|
||||
$limit = 15;
|
||||
$records = [];
|
||||
$graphArray = null;
|
||||
$total = 0;
|
||||
|
||||
try {
|
||||
$queryResult = $this->query
|
||||
->filter($arguments)
|
||||
->limit($limit)
|
||||
->status(explode(",", $arguments["_sys.status_in"]))
|
||||
->skip($skip)
|
||||
->sort($sort)
|
||||
->childrenDepth(1)
|
||||
->parentsDepth(0)
|
||||
->runWithCount();
|
||||
$graph = $this->query
|
||||
->filter($arguments)
|
||||
->limit($limit)
|
||||
->status(explode(",", $arguments["status_in"]))
|
||||
->skip($skip)
|
||||
->sort($sort)
|
||||
->childrenDepth(1)
|
||||
->parentsDepth(0)
|
||||
->runWithCount();
|
||||
|
||||
$records = $graph->getRootRecords()->toArray();
|
||||
|
||||
|
||||
$graph = $queryResult->getQueryRecords();
|
||||
$graphArray = $graph->toArray();
|
||||
$total = $queryResult->getTotal();
|
||||
$records = $graph->getRootRecords()->toArray();
|
||||
} catch (SubqueryNoResultException) {
|
||||
}
|
||||
|
||||
$data = [
|
||||
"schemas" => $this->channelService->channel->schemas,
|
||||
"schema" => $schema,
|
||||
"users" => $users,
|
||||
"records" => $records,
|
||||
"graph" => $graphArray,
|
||||
"graph" => toArray($graph),
|
||||
"systemFields" => array_values(System::list()),
|
||||
"operators" => array_values(Operator::list()),
|
||||
"sort" => $sort,
|
||||
"limit" => $limit,
|
||||
"skip" => $skip,
|
||||
"total" => $total,
|
||||
"total" => $graph->total ?? 0,
|
||||
"filter" => $request->input("filter") ?? [],
|
||||
"inModal" => true,
|
||||
];
|
||||
@@ -192,7 +186,7 @@ class RecordController extends Controller
|
||||
$rid = $request->route("rid");
|
||||
|
||||
|
||||
$queryResult = $this->query
|
||||
$graph = $this->query
|
||||
->filter(["id" => $rid])
|
||||
->limit(1)
|
||||
->skip(0)
|
||||
@@ -203,9 +197,7 @@ class RecordController extends Controller
|
||||
->run();
|
||||
|
||||
|
||||
$graph = $queryResult->getQueryRecords();
|
||||
|
||||
if (empty($graph->records[0])) {
|
||||
if ($graph->records->isEmpty()) {
|
||||
return $this->svelte->render(
|
||||
layout: "channel",
|
||||
view: "recordNotFound",
|
||||
@@ -213,8 +205,8 @@ class RecordController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
$record = $graph->records[0];
|
||||
$schema = $this->channelService->channel->schemas->where("name", $record->_sys->schema)->first();
|
||||
$record = $graph->records->first();
|
||||
$schema = $this->channelService->getSchema($record->schema)->get();
|
||||
$recordHistory = $this->recordManager->fromSession($request->session())->push($rid)->getRecords($rid);
|
||||
$users = $this->userRepo->all();
|
||||
return $this->svelte->render(
|
||||
@@ -223,11 +215,10 @@ class RecordController extends Controller
|
||||
title: "Edit Record",
|
||||
data: [
|
||||
"schema" => $schema,
|
||||
"graph" => $graph->toArray(),
|
||||
"record" => $record->toArray(),
|
||||
"graph" => toArray($graph),
|
||||
"record" => toArray($record),
|
||||
"users" => $users,
|
||||
"recordHistory" => $recordHistory,
|
||||
"isCreateMode" => $record->_sys->status === "empty",
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -294,37 +285,37 @@ class RecordController extends Controller
|
||||
|
||||
if ($request->input("isCreateMode")) {
|
||||
$this->recordService->create(
|
||||
schemaName: $request->input("record._sys.schema"),
|
||||
schemaName: $request->input("record.schema"),
|
||||
data: $request->input("record.data"),
|
||||
id: $request->input("record.id"),
|
||||
file: $request->input("record._file") ?? [],
|
||||
edges: $request->input("edges"),
|
||||
status: $request->input("record._sys.status"),
|
||||
status: $request->input("record.status"),
|
||||
uploadFromUrl: ""
|
||||
);
|
||||
} else {
|
||||
$this->recordService->update(
|
||||
id: $request->input("record.id"),
|
||||
data: $request->input("record.data"),
|
||||
status: $request->input("record._sys.status"),
|
||||
status: $request->input("record.status"),
|
||||
edges: $request->input("edges"),
|
||||
updateEdges: true,
|
||||
);
|
||||
}
|
||||
|
||||
$queryResult = $this->query
|
||||
$newGraph = $this->query
|
||||
->filter(["id" => $request->input("record.id")])
|
||||
->limit(10)
|
||||
->childrenDepth(2)
|
||||
->parentsDepth(1)
|
||||
->run();
|
||||
$newGraph = $queryResult->getQueryRecords();
|
||||
|
||||
} catch (ValidatorException $th) {
|
||||
return fail($th->getValidatorErrors());
|
||||
} catch (LucentException $th) {
|
||||
return fail($th);
|
||||
}
|
||||
return ok($newGraph->toArray());
|
||||
return ok(toArray($newGraph));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Lucent\Http\Controller;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Lucent\Channel\ChannelRepo;
|
||||
use Lucent\LucentException;
|
||||
use Lucent\Schema\SchemaRepo;
|
||||
use Lucent\Schema\SchemaService;
|
||||
use function Lucent\Response\fail;
|
||||
use function Lucent\Response\ok;
|
||||
use function Lucent\Svelte\svelte;
|
||||
|
||||
class SchemaController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly SchemaRepo $schemaRepo,
|
||||
private readonly SchemaService $schemaService
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws LucentException
|
||||
*/
|
||||
public function new(): View
|
||||
{
|
||||
$schemas = $this->schemaRepo->all();
|
||||
|
||||
return svelte(
|
||||
layout: "channel",
|
||||
view: "schemaNew",
|
||||
title: "Create schema",
|
||||
data: [
|
||||
"schemas" => $schemas,
|
||||
"schema" => Schema::fromArray([]),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function create(Request $request): Response
|
||||
{
|
||||
|
||||
try {
|
||||
$this->schemaService->create(
|
||||
name: $request->input("name"),
|
||||
label: $request->input("label"),
|
||||
type: $request->input("type"),
|
||||
isEntry: $request->input("isEntry"),
|
||||
revisionRetentionDays: $request->input("revisionRetentionDays"),
|
||||
revisionRetentionNumber: $request->input("revisionRetentionNumber"),
|
||||
trashedRetentionDays: $request->input("trashedRetentionDays"),
|
||||
fields: [],
|
||||
path: $request->input("path"),
|
||||
);
|
||||
} catch (LucentException $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
|
||||
return ok();
|
||||
}
|
||||
|
||||
public function edit(string $name): View
|
||||
{
|
||||
$channel = ChannelRepo::current();
|
||||
return svelte(
|
||||
layout: "channel",
|
||||
view: "schemaEdit",
|
||||
title: "Schemas",
|
||||
data: [
|
||||
"schemas" => $channel->schemas,
|
||||
"schema" => $channel->schemas->where("name.value", $name)->first(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function delete(Request $request): View
|
||||
{
|
||||
$channel = ChannelRepo::current();
|
||||
return svelte(
|
||||
layout: "channel",
|
||||
view: "schemaDelete",
|
||||
title: "Schemas",
|
||||
data: [
|
||||
"channel" => $channel,
|
||||
"schemas" => $channel->schemas,
|
||||
"schema" => $channel->schemas->firstWhere("name", $request->route("name")),
|
||||
"nav" => "collections",
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function update(Request $request): Response
|
||||
{
|
||||
try {
|
||||
$schema = $this->schemaService->update(
|
||||
name: $request->input("name"),
|
||||
label: $request->input("label"),
|
||||
isEntry: $request->input("isEntry"),
|
||||
color: $request->input("color") ?? "",
|
||||
visible: $request->input("visible") ?? [],
|
||||
titleTemplate: $request->input("titleTemplate") ?? "",
|
||||
revisionRetentionDays: $request->input("revisionRetentionDays"),
|
||||
revisionRetentionNumber: $request->input("revisionRetentionNumber"),
|
||||
trashedRetentionDays: $request->input("trashedRetentionDays"),
|
||||
path: $request->input("path"),
|
||||
);
|
||||
} catch (LucentException $e) {
|
||||
return fail($e);
|
||||
}
|
||||
|
||||
return ok($schema->toArray());
|
||||
}
|
||||
|
||||
public function postDelete(Request $request): Response
|
||||
{
|
||||
|
||||
$this->schemaService->delete($request->input("name"));
|
||||
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Lucent\Http\Controller;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Lucent\Account\Auth;
|
||||
use Lucent\Channel\ChannelContext;
|
||||
use Lucent\Schema\SchemaRepo;
|
||||
use Lucent\View\ViewRepo;
|
||||
use function Lucent\Response\fail;
|
||||
use function Lucent\Response\ok;
|
||||
|
||||
class ViewController extends Controller
|
||||
{
|
||||
|
||||
public function redirect(Request $request, string $cid, string $schemaName, string $viewName)
|
||||
{
|
||||
|
||||
$schema = SchemaRepo::findByName($schemaName);
|
||||
$view = $schema->views->whereName($viewName);
|
||||
parse_str($view->params, $viewParamsArray);
|
||||
return \redirect("/c/{$cid}/content/{$schemaName}/views/{$viewName}?{$view->params}");
|
||||
}
|
||||
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
try {
|
||||
$schema = SchemaRepo::findByName($request->input("schemaName"));
|
||||
ViewRepo::create($schema, $request->input("view"), Auth::currentUserId());
|
||||
} catch (\Throwable $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
return ok();
|
||||
}
|
||||
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
try {
|
||||
$schema = SchemaRepo::findByName($request->input("schemaName"));
|
||||
ViewRepo::update($schema, $request->input("view"));
|
||||
} catch (\Throwable $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
$schema = SchemaRepo::findByName($request->input("schemaName"));
|
||||
$view = $schema->views->whereName($request->input("view.name"));
|
||||
|
||||
return ok((array)$view);
|
||||
}
|
||||
|
||||
public function delete(Request $request, string $cid, string $schemaName, string $viewName)
|
||||
{
|
||||
try {
|
||||
$schema = SchemaRepo::findByName($schemaName);
|
||||
ViewRepo::delete($schema, $viewName);
|
||||
} catch (\Throwable $th) {
|
||||
return fail($th);
|
||||
}
|
||||
|
||||
return redirect("c/{$cid}/content/{$schemaName}");
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,6 @@ use Lucent\Http\Controller\Api\FileController;
|
||||
use Lucent\Http\Controller\Api\RecordController;
|
||||
use Lucent\Http\Controller\Api\SchemaController;
|
||||
|
||||
Route::middleware('auth.api:developer')->group(function () {
|
||||
Route::post('/schemas', [SchemaController::class, 'create']);
|
||||
Route::put('/schemas/', [SchemaController::class, 'update']);
|
||||
Route::delete('/schemas/{name}', [SchemaController::class, 'delete']);
|
||||
Route::post('/schemas/fields', [SchemaController::class, 'fields']);
|
||||
});
|
||||
|
||||
Route::middleware('auth.api:editor')->group(function () {
|
||||
|
||||
@@ -29,26 +23,3 @@ Route::middleware('auth.api:reader')->group(function () {
|
||||
Route::get('/records', [RecordController::class, 'records']);
|
||||
});
|
||||
|
||||
// They need testing
|
||||
// Route::middleware('auth.api')->prefix("/fields")->controller(FieldController::class)->group(function () {
|
||||
// Route::post('/', 'create');
|
||||
// Route::put('/', 'update');
|
||||
// Route::delete('/{id}', 'delete');
|
||||
// });
|
||||
|
||||
//Route::middleware(["auth.api"])->group(function () {
|
||||
//
|
||||
//// Route::get('/{rid}', 'findOne');
|
||||
//
|
||||
//// Route::delete('/records/{id}', [RecordController::class, 'delete']);
|
||||
//// Route::post('/bulk', 'bulkCreate');
|
||||
//// Route::put('/bulk', 'bulkUpdate');
|
||||
//// Route::delete('/bulk', 'bulkDelete');
|
||||
//
|
||||
//
|
||||
//});
|
||||
//
|
||||
//
|
||||
//Route::middleware('auth.api')->prefix("/files")->controller(FileController::class)->group(function () {
|
||||
// Route::post('/', 'upload');
|
||||
//});
|
||||
|
||||
@@ -41,16 +41,6 @@ Route::group([
|
||||
});
|
||||
|
||||
|
||||
Route::middleware(["lucent.auth"])->prefix("/schemas/")->group(function () {
|
||||
Route::get('/new/', [SchemaController::class, 'new']);
|
||||
Route::post('/', [SchemaController::class, 'create']);
|
||||
Route::get('/{name}/edit', [SchemaController::class, 'edit']);
|
||||
Route::put('/', [SchemaController::class, 'update']);
|
||||
Route::get('/{name}/delete', [SchemaController::class, 'delete']);
|
||||
Route::post('/delete', [SchemaController::class, 'postDelete']);
|
||||
});
|
||||
|
||||
|
||||
Route::middleware(["lucent.auth"])->prefix("/records")->group(function () {
|
||||
|
||||
Route::get('/new', [RecordController::class, 'new']);
|
||||
@@ -88,9 +78,6 @@ Route::group([
|
||||
});
|
||||
|
||||
|
||||
Route::get('/fs/cache/{path}', [FileController::class, 'get'])->where('path', '.*');
|
||||
Route::get('/fs/{path}', [FileController::class, 'get'])->where('path', '.*');
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user