update server routes

This commit is contained in:
gerchek 2022-03-20 11:09:51 +00:00
parent 62e1e2fcfe
commit a772a347e8
2 changed files with 7 additions and 6 deletions

View File

@ -16,9 +16,9 @@ Route::group(['prefix' => 'api'], function() {
App::abort(404, 'Page not found');
$login_fields = Settings::get('login_fields', ['email', 'password']);
$credentials = Input::only($login_fields);
$credentials = Input::only('email', 'password');
// dd($credentials);
try {
// verify the credentials and create a token for the user
if (! $token = JWTAuth::attempt($credentials)) {
@ -28,7 +28,7 @@ Route::group(['prefix' => 'api'], function() {
// something went wrong
return response()->json(['error' => 'could_not_create_token'], 500);
}
//dd($credentials);
$userModel = JWTAuth::authenticate($token);
if ($userModel->methodExists('getAuthApiSigninAttributes')) {
@ -271,7 +271,7 @@ Route::group(['prefix' => 'api'], function() {
$message = $Contact->message =$data['message'];
$date = $Contact->date =$data['date'];
// dd($Contact);
dd($data);
$Contact->save();
@ -416,4 +416,4 @@ Route::group(['prefix' => 'api'], function() {
})->middleware('\Tymon\JWTAuth\Middleware\GetUserFromToken');
});
});

View File

@ -0,0 +1 @@
static-pages: { }