feat: allow users to set their age
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -24,7 +24,9 @@ namespace App\Http\Controllers;
|
||||
use App\Application;
|
||||
use App\Exceptions\ApplicationNotFoundException;
|
||||
use App\Exceptions\DiscordAccountRequiredException;
|
||||
use App\Exceptions\IncompatibleAgeException;
|
||||
use App\Exceptions\IncompleteApplicationException;
|
||||
use App\Exceptions\InvalidAgeException;
|
||||
use App\Exceptions\UnavailableApplicationException;
|
||||
use App\Exceptions\VacancyNotFoundException;
|
||||
use App\Facades\IP;
|
||||
@@ -108,6 +110,15 @@ class ApplicationController extends Controller
|
||||
|
||||
request()->session()->put('discordApplicationRedirectedSlug', $vacancySlug);
|
||||
return redirect(route('discordRedirect'));
|
||||
} catch (IncompatibleAgeException $e) {
|
||||
|
||||
return redirect()
|
||||
->to(route('dashboard'))
|
||||
->with('error', $e->getMessage());
|
||||
|
||||
} catch (InvalidAgeException $e) {
|
||||
|
||||
return view('dashboard.application-rendering.add-age');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user