server: use default API version if not specified
This commit is contained in:
parent
ccf6d33c89
commit
9c3905c7a5
1 changed files with 5 additions and 0 deletions
|
@ -75,8 +75,13 @@ impl IntoResponse for ApiError {
|
|||
|
||||
type ApiResult<T> = Result<T, ApiError>;
|
||||
|
||||
fn default_api_version() -> String {
|
||||
"4".to_owned()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
struct ApiVersion {
|
||||
#[serde(default = "default_api_version")]
|
||||
api_version: String,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue