various fixes
This commit is contained in:
@@ -327,6 +327,7 @@ class RecordController extends Controller
|
||||
uploadFromUrl: ""
|
||||
);
|
||||
} else {
|
||||
|
||||
$this->recordService->update(
|
||||
id: $request->input("record.id"),
|
||||
data: $request->input("record.data"),
|
||||
|
||||
@@ -98,8 +98,7 @@ readonly class RecordService
|
||||
* @throws LucentException
|
||||
* @throws ValidatorException
|
||||
*/
|
||||
public
|
||||
function update(
|
||||
public function update(
|
||||
string $id,
|
||||
array $data,
|
||||
string $status = "draft",
|
||||
@@ -128,7 +127,8 @@ readonly class RecordService
|
||||
}
|
||||
|
||||
if (Status::from($status) === Status::PUBLISHED) {
|
||||
$errors = $this->recordValidator->check($record->schema, $record->data, $uniqueEdgesCollection);
|
||||
$errors = $this->recordValidator->check($record->schema, $formattedData, $uniqueEdgesCollection);
|
||||
|
||||
if ($errors->isNotEmpty()) {
|
||||
$this->recordValidator->throwException($errors);
|
||||
}
|
||||
@@ -148,9 +148,6 @@ readonly class RecordService
|
||||
_file: $record->_file,
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
RecordRepo::update($newRecord);
|
||||
if ($updateEdges) {
|
||||
EdgeRepo::update($newRecord->id, $uniqueEdgesCollection);
|
||||
@@ -162,8 +159,7 @@ readonly class RecordService
|
||||
|
||||
/**
|
||||
*/
|
||||
public
|
||||
function changeStatusBulk(
|
||||
public function changeStatusBulk(
|
||||
string $status,
|
||||
array $recordsIds,
|
||||
): void
|
||||
|
||||
Reference in New Issue
Block a user