account refactor

This commit is contained in:
2023-10-17 18:30:41 +03:00
parent 23219ce998
commit d9736b29a4
17 changed files with 91 additions and 186 deletions
+1 -5
View File
@@ -48,11 +48,7 @@ readonly class RecordService
string $uploadFromUrl = "",
): string
{
$schema = $this->channelService->channel->schemas->where("name", $schemaName)->first();
if (empty($schema)) {
throw new LucentException("The schema " . $schemaName . " does not exist");
}
$schema = $this->channelService->getSchema($schemaName)->get();
$formattedData = $this->inputFormatter->fill($schemaName, new RecordData($data));
if (empty($formattedData["id"])) {