fix bugs
parent
adac5fe9f4
commit
4375700e2b
|
|
@ -10,7 +10,7 @@ use Illuminate\Http\JsonResponse;
|
|||
|
||||
class FeedbackForms extends FormsService {
|
||||
public function store(array $data): ?JsonResponse {
|
||||
if ($objectType = ObjectType::byUuid($data['type'] ?? null)->first()) {
|
||||
if ($objectType = ObjectType::byUuidOrName($data['type'] ?? null)->first()) {
|
||||
$object = $objectType->objects()->create();
|
||||
$object->setValues($data);
|
||||
if (!empty($data['mailto'])) event(new FeedbackFormSubmitted($object, $data['mailto']));
|
||||
|
|
|
|||
|
|
@ -74,6 +74,4 @@ class FormsService {
|
|||
return ['id' => $name, 'title' => $title];
|
||||
})->values()->all()];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue