diff --git a/backend/app/Model/ApiKey.php b/backend/app/Model/ApiKey.php index 8a55a7b..97becf1 100644 --- a/backend/app/Model/ApiKey.php +++ b/backend/app/Model/ApiKey.php @@ -70,6 +70,8 @@ class ApiKey extends Model 'key_hash' => hash('sha256', $plain_key), 'key_prefix' => substr($plain_key, 0, 8), 'expires_at' => $expires_at, + 'enabled' => true, + 'created_at' => \Carbon\Carbon::now(), ]); return ['api_key' => $model, 'plain_key' => $plain_key];