mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
split data and api keys
This commit is contained in:
parent
e14640e530
commit
09d4e37044
4 changed files with 56 additions and 64 deletions
|
@ -10,7 +10,7 @@ use crate::extractors::authentication::{policies::*, GuardedData};
|
|||
use crate::index::{Settings, Unchecked};
|
||||
use crate::index_controller::update_actor::RegisterUpdate;
|
||||
use crate::index_controller::{UpdateResult, UpdateStatus};
|
||||
use crate::Data;
|
||||
use crate::{ApiKeys, Data};
|
||||
|
||||
mod dump;
|
||||
mod indexes;
|
||||
|
@ -262,8 +262,8 @@ struct KeysResponse {
|
|||
public: Option<String>,
|
||||
}
|
||||
|
||||
pub async fn list_keys(data: GuardedData<Admin, Data>) -> HttpResponse {
|
||||
let api_keys = data.api_keys.clone();
|
||||
pub async fn list_keys(data: GuardedData<Admin, ApiKeys>) -> HttpResponse {
|
||||
let api_keys = (*data).clone();
|
||||
HttpResponse::Ok().json(&KeysResponse {
|
||||
private: api_keys.private,
|
||||
public: api_keys.public,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue