core: type platform api key timestamps

This commit is contained in:
a.tolmachev
2026-04-13 06:28:58 +00:00
parent c736b4f5a8
commit dddbbac745
8 changed files with 58 additions and 38 deletions
+4 -4
View File
@@ -1676,7 +1676,7 @@ mod tests {
prefix: "crk_live".to_owned(),
scopes: vec![PlatformApiKeyScope::Read, PlatformApiKeyScope::Write],
status: PlatformApiKeyStatus::Active,
created_at: "2026-03-25T12:01:00Z".to_owned(),
created_at: timestamp("2026-03-25T12:01:00Z"),
last_used_at: None,
};
let secret_hash = "secret_hash_01";
@@ -1717,7 +1717,7 @@ mod tests {
.touch_platform_api_key(
&workspace.id,
&PlatformApiKeyId::new("key_01"),
"2026-03-25T12:05:00Z",
&timestamp("2026-03-25T12:05:00Z"),
)
.await
.unwrap();
@@ -1727,8 +1727,8 @@ mod tests {
.await
.unwrap();
assert_eq!(
touched[0].api_key.last_used_at.as_deref(),
Some("2026-03-25T12:05:00Z")
touched[0].api_key.last_used_at,
Some(timestamp("2026-03-25T12:05:00Z"))
);
database.cleanup().await;