From 5e8297d822976045c43e1e4c42fa75c2d5877fc1 Mon Sep 17 00:00:00 2001 From: Nick Zeng Date: Mon, 9 Mar 2026 13:36:08 +0800 Subject: [PATCH] update api key model --- backend/app/Model/ApiKey.php | 2 ++ 1 file changed, 2 insertions(+) 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];