Skip to content

Commit

Permalink
IP-325: As a platform user, when a solution I submitted is published,…
Browse files Browse the repository at this point in the history
… I receive an email so that I can view the solution I submitted
  • Loading branch information
PavlosIsaris committed Dec 16, 2024
1 parent 11e2563 commit 76680fd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions app/Http/Controllers/Solution/SolutionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\BusinessLogicLayer\Solution\SolutionManager;
use App\Http\Controllers\Controller;
use App\Models\Solution\Solution;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand All @@ -30,17 +29,6 @@ public function index(): View {
* Show the form for creating a new resource.
*/
public function create(Request $request): View|RedirectResponse {
$user = auth()->user();
$solution = Solution::find(1);
// notify the user that their solution has been submitted
$user->notify(new \App\Notifications\SolutionSubmitted($solution));

// get the creator of the solution problem
$problem_creator = $solution->problem->creator;

// notify the creator of the solution submission
$problem_creator->notify(new \App\Notifications\SolutionPublished($solution));

$this->validate($request, [
'problem_id' => 'required|different:execute_solution|exists:problems,id',
]);
Expand Down

0 comments on commit 76680fd

Please sign in to comment.