mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-12-25 19:04:34 -05:00
Use the api for contact and subscription form post routes
This commit is contained in:
parent
631d29956b
commit
3715826049
3 changed files with 10 additions and 10 deletions
|
@ -27,7 +27,7 @@ function contactFormInit() {
|
|||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/contact-submit",
|
||||
url: "/api/contact-submit",
|
||||
data: contact
|
||||
}).always(function(response) {
|
||||
let responseJSON, errors, prop;
|
||||
|
|
|
@ -16,3 +16,12 @@ use Illuminate\Http\Request;
|
|||
Route::middleware('auth:api')->get('/user', function(Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Post Routes
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Route::post('/contact-submit', 'ContactController@postContactSubmit');
|
||||
Route::post('/subscription-submit', 'SubscriptionController@postSubscriptionSubmit');
|
||||
|
|
|
@ -25,15 +25,6 @@ Route::get('/contact', function() {
|
|||
return view('website.contact');
|
||||
});
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Post Routes
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Route::post('/contact-submit', 'ContactController@postContactSubmit');
|
||||
Route::post('/subscription-submit', 'SubscriptionController@postSubscriptionSubmit');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Routes
|
||||
|
|
Loading…
Reference in a new issue