feat: add api key generation endpint + role authorization
This commit is contained in:
@@ -178,3 +178,14 @@ pub struct ChatDelta {
|
||||
pub role: Option<Role>,
|
||||
pub content: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
pub struct CreateApiKeyRequest {
|
||||
pub name: String,
|
||||
pub scopes: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
pub struct CreateApiKeyResponse {
|
||||
pub api_key: String, // ONLY returned once
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user