feat: add created_at field to CreatedApiKeyResponse and update related handlers
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user