mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
Make it work in the CreateApiKey struct
This commit is contained in:
@ -61,6 +61,7 @@ pub struct ListApiKeys {
|
||||
#[deserr(error = DeserrError<InvalidApiKeyLimit>, default = PAGINATION_DEFAULT_LIMIT(), from(&String) = parse_usize_take_error_message -> TakeErrorMessage<std::num::ParseIntError>)]
|
||||
pub limit: usize,
|
||||
}
|
||||
|
||||
impl ListApiKeys {
|
||||
fn as_pagination(self) -> Pagination {
|
||||
Pagination { offset: self.offset, limit: self.limit }
|
||||
|
@ -56,6 +56,7 @@ where
|
||||
{
|
||||
Ok(Some(input.parse()?))
|
||||
}
|
||||
|
||||
pub fn from_string_to_option_take_error_message<T, E>(
|
||||
input: &str,
|
||||
) -> Result<Option<T>, TakeErrorMessage<E>>
|
||||
@ -90,6 +91,7 @@ impl From<Task> for SummarizedTaskView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pagination {
|
||||
pub offset: usize,
|
||||
pub limit: usize,
|
||||
|
Reference in New Issue
Block a user