🐛 Fix rotate key

This commit is contained in:
2025-08-24 01:49:48 +08:00
parent 953bf5d4de
commit 7cb14940d9
5 changed files with 58 additions and 23 deletions

View File

@@ -328,7 +328,9 @@ public class ApiKeyReference : ModelBase
Label = Label,
AccountId = AccountId.ToString(),
SessionId = SessionId.ToString(),
Key = Key
Key = Key,
CreatedAt = CreatedAt.ToTimestamp(),
UpdatedAt = UpdatedAt.ToTimestamp()
};
}
@@ -340,7 +342,9 @@ public class ApiKeyReference : ModelBase
AccountId = Guid.Parse(proto.AccountId),
SessionId = Guid.Parse(proto.SessionId),
Label = proto.Label,
Key = proto.Key
Key = proto.Key,
CreatedAt = proto.CreatedAt.ToInstant(),
UpdatedAt = proto.UpdatedAt.ToInstant()
};
}
}

View File

@@ -143,6 +143,8 @@ message ApiKey {
string account_id = 3;
string session_id = 4;
google.protobuf.StringValue key = 5;
google.protobuf.Timestamp created_at = 6;
google.protobuf.Timestamp updated_at = 7;
}
message GetApiKeyRequest {
@@ -166,7 +168,7 @@ service BotAccountReceiverService {
rpc CreateBotAccount(CreateBotAccountRequest) returns (CreateBotAccountResponse);
rpc UpdateBotAccount(UpdateBotAccountRequest) returns (UpdateBotAccountResponse);
rpc DeleteBotAccount(DeleteBotAccountRequest) returns (DeleteBotAccountResponse);
rpc GetApiKey(GetApiKeyRequest) returns (ApiKey);
rpc ListApiKey(ListApiKeyRequest) returns (GetApiKeyBatchResponse);
rpc CreateApiKey(ApiKey) returns (ApiKey);