From fc1be06ca9c219e6bb8e6610e5df525e3f5fc563 Mon Sep 17 00:00:00 2001 From: jggj21 Date: Thu, 29 Aug 2024 15:10:26 -0600 Subject: [PATCH] update task --- resources/views/tasks.blade.php | 4 ++-- routes/web.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/tasks.blade.php b/resources/views/tasks.blade.php index af349d8ef..a61582020 100644 --- a/resources/views/tasks.blade.php +++ b/resources/views/tasks.blade.php @@ -231,14 +231,14 @@ console.log(pair[0]+ ': ' + pair[1]); } $.ajax({ - url: updateUrl, + url: $(this).attr('action'), type: 'POST', data: formData, processData: false, contentType: false, success: function (response) { $('#editTaskModal').modal('hide'); - //location.reload(); + location.reload(); }, error: function (xhr) { console.error('Error:', xhr.responseText); diff --git a/routes/web.php b/routes/web.php index 2cf50e01e..71a28e714 100644 --- a/routes/web.php +++ b/routes/web.php @@ -104,9 +104,9 @@ if ($validator->fails()) { Log::error("Edit task failed."); - /* return redirect('/') + return redirect('/') ->withInput() - ->withErrors($validator); */ + ->withErrors($validator); } $task = Task::findOrFail($id);