Skip to content

Commit

Permalink
Add default role_id to API register method (#79)
Browse files Browse the repository at this point in the history
* Add default role_id to API register method

* Add default role_id to API register method
  • Loading branch information
bobbyiliev committed Jan 10, 2023
1 parent abe5c77 commit a8092d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wave/src/Http/Controllers/API/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use TCG\Voyager\Models\Role;
use Tymon\JWTAuth\Facades\JWTAuth;
use Wave\ApiKey;
use Wave\User;
use App\Models\User;

class AuthController extends Controller
{
Expand Down Expand Up @@ -117,6 +117,7 @@ public function register(Request $request)
'email' => $request->email,
'username' => $request->username,
'password' => bcrypt($request->password),
'role_id' => $role->id,
]);

$credentials = ['email' => $request['email'], 'password' => $request['password']];
Expand Down

0 comments on commit a8092d6

Please sign in to comment.