Use the api for contact and subscription form post routes

This commit is contained in:
Kevin MacMartin 2017-01-30 21:00:05 -05:00
parent 631d29956b
commit 3715826049
3 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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');

View file

@ -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