mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-25 08:51:25 -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({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/contact-submit",
|
url: "/api/contact-submit",
|
||||||
data: contact
|
data: contact
|
||||||
}).always(function(response) {
|
}).always(function(response) {
|
||||||
let responseJSON, errors, prop;
|
let responseJSON, errors, prop;
|
||||||
|
|
|
@ -16,3 +16,12 @@ use Illuminate\Http\Request;
|
||||||
Route::middleware('auth:api')->get('/user', function(Request $request) {
|
Route::middleware('auth:api')->get('/user', function(Request $request) {
|
||||||
return $request->user();
|
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');
|
return view('website.contact');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Post Routes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::post('/contact-submit', 'ContactController@postContactSubmit');
|
|
||||||
Route::post('/subscription-submit', 'SubscriptionController@postSubscriptionSubmit');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Authentication Routes
|
| Authentication Routes
|
||||||
|
|
Loading…
Reference in a new issue