Compare commits

..

No commits in common. "7cd5f1c4da9b261fa9cd96bd6e977bb876336872" and "8dd1044d8b3620fc8da52139db118d2d90d3c657" have entirely different histories.

2 changed files with 0 additions and 13 deletions

View File

@ -47,16 +47,4 @@ class PublicUserController extends Controller
return response() return response()
->json('bad_password', 400); ->json('bad_password', 400);
} }
public function reset(Request $request)
{
$user = User::where([ 'email' => $request->input('email') ])->get();
if ($user->count() == 0) {
return;
}
$user = $user[0];
$user->password = Hash::make($request->input('new_pass'));
$user->save();
}
} }

View File

@ -11,7 +11,6 @@ Route::prefix('/api')->group(function() {
Route::controller(PublicUserController::class)->prefix('/users')->group(function() { Route::controller(PublicUserController::class)->prefix('/users')->group(function() {
Route::put('/register', 'register'); Route::put('/register', 'register');
Route::post('/login', 'login'); Route::post('/login', 'login');
Route::post('/reset', 'reset');
}); });
}); });