feat: add created_at field to CreatedApiKeyResponse and update related handlers
Some checks failed
lint / lint (push) Successful in 16m47s
test / unit (push) Has been cancelled

This commit is contained in:
2026-07-04 15:04:16 +02:00
parent 8f69cfb011
commit c22bc68a8b
7 changed files with 35 additions and 11 deletions

View File

@@ -105,6 +105,7 @@ pub struct ErrorResponse {
pub struct CreatedApiKeyResponse {
pub id: Uuid,
pub name: String,
pub created_at: DateTime<Utc>,
/// Raw API key — shown only once at creation
pub key: String,
}

View File

@@ -42,6 +42,7 @@ pub async fn post_api_key(
Ok(Json(CreatedApiKeyResponse {
id: key.id.as_uuid(),
name: key.name,
created_at: key.created_at,
key: raw,
}))
}