1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-06 13:16:45 +02:00

feat(console): update command utils:create-token

This commit is contained in:
Awilum
2022-04-28 12:23:37 +03:00
parent 62ad1e929b
commit 37749d1205

View File

@@ -37,7 +37,7 @@ class CreateTokenCommand extends Command
$access_token = generateToken();
$hashed_access_token = generateTokenHash($access_token);
filesystem()->directory(PATH['project'] . '/entries/tokens')->ensureExists();
! entries()->has('tokens') and entries()->create('tokens', ['title' => 'Tokens']);
if (entries()->create('tokens/' . $token, ['hashed_access_token' => $hashed_access_token])) {
$output->write(