Cleanup frontend to only pass the required description field

This commit is contained in:
Dane Everitt 2021-07-28 21:13:49 -07:00
parent 374910d73a
commit dfff8ad667
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 30 additions and 27 deletions

View file

@ -35,8 +35,8 @@ trait HasAccessTokens
$token = $this->tokens()->create([
'user_id' => $this->id,
'description' => $description,
'token' => hash('sha256', $plain = Str::random(36)),
'token_id' => 'ptdl_' . Str::random(11),
'token' => hash('sha256', $plain = Str::random(PersonalAccessToken::TOKEN_LENGTH)),
'token_id' => PersonalAccessToken::generateTokenIdentifier(),
'abilities' => $abilities,
]);