]> git.localhorst.tv Git - alttp.git/blobdiff - app/Http/Controllers/RoundController.php
basic seed code input
[alttp.git] / app / Http / Controllers / RoundController.php
index 2b6c617acfbaa03d93df72544f4881d2036eb812..337e1111fea27dcde1c2a229121e9d4cb429f8a9 100644 (file)
@@ -43,10 +43,13 @@ class RoundController extends Controller
                $this->authorize('update', $round);
 
                $validatedData = $request->validate([
+                       'code' => 'array',
+                       'code.*' => 'string',
                        'seed' => 'url',
                        'title' => 'string',
                ]);
 
+               $round->code = array_filter($validatedData['code']);
                $round->seed = $validatedData['seed'];
                $round->title = $validatedData['title'];
                $round->update();