Removed unnecessary user
This commit is contained in:
		| @@ -137,7 +137,6 @@ function validateNote() { | ||||
|     const title = document.querySelector('#noteTitle'); | ||||
|     const id = document.querySelector('#noteId'); | ||||
|     const psg = document.querySelector('#passage'); | ||||
|     const user = document.querySelector('#user'); | ||||
|  | ||||
|     if (!isUuidV4Valid(id.value)) { return false; } | ||||
|     if (!title.value.length) { return false; } | ||||
| @@ -146,7 +145,6 @@ function validateNote() { | ||||
|     if (!parseInt(series.value)) { return false; } | ||||
|     if (!psg.value) { return false; } | ||||
|     if (!note.value.length) { return false; } | ||||
|     if (!user.value) { return false; } | ||||
|  | ||||
|     return true; | ||||
| } | ||||
|   | ||||
| @@ -16,6 +16,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
| use Symfony\Component\Routing\Attribute\Route; | ||||
| use Symfony\Component\Uid\Uuid; | ||||
|  | ||||
| class AjaxController extends AbstractController | ||||
| { | ||||
| @@ -268,18 +269,15 @@ class AjaxController extends AbstractController | ||||
|  | ||||
|         if (!$note) { | ||||
|             $note = new Note(); | ||||
|             $note->setId($data->id); | ||||
|             $uuid = Uuid::fromString($data->id); | ||||
|             $note->setId($uuid); | ||||
|         } | ||||
|  | ||||
|         $refs = json_decode(json_encode($data->refs), true); | ||||
|  | ||||
|         $series = $emi->getRepository(Series::class)->find($data->series); | ||||
|         $speaker = $emi->getRepository(Speaker::class)->find($data->speaker); | ||||
|         $user = $emi->getRepository(User::class)->findBy(['email' => $data->user]); | ||||
|  | ||||
|         if (is_array($user)) { | ||||
|             $user = $user[0]; | ||||
|         } | ||||
|         $user = $this->getUser(); | ||||
|  | ||||
|         $note->setUser($user) | ||||
|              ->setTitle($data->title) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user